views:

353

answers:

4

Hi,

          <p style="" class="closeField float_left" disabled="true"> 
 <a href="/knome2/comments/115/report_abuse" class="btn lbOn"><span class="button_image">
 <span class="report_abuse background_16">Close</span></span></a>

         </p>


I am trying to make this <p> as disabled , actually my this <p> tag will displayes like a button by CSS...
How to make this <p> tag to disable?? In JQuery
+6  A: 

Best way to create an element that looks like a disabled button is to create a disabled button. Do you know that <button> tag allows inserting complex html inside it?

n1313
A: 

you can use $('p').remove() or $('p').empty() if by disabled you mean disappear.

Elzo Valugi
A: 

You need to create a disabled style in CSS and then apply it with jQuery

daddywoodland
A: 

if you use this P for a click event, and you mean "disable" to stop the event.

then you can unbind the event $("p").unbind("click")

or if you mean to lower the opacity as if it is disabled you can set the opacity via $("p").css("opacity",0.7), or you can animate the opacity via animate $("p").fadeTo("slow", 0.7);

adardesign