views:

97

answers:

1

php code:

<a id="a$id" onclick="check($id,1)" href="javascript:void(0)"  class="black">Qualify</a>

How to remove onclick="check($id,1) so "Qualify" can not be clicked or "check($id,1) won't be fired. How to do it with JQuery?

+6  A: 

Try this :

$('a#...').attr('onclick','').unbind('click');

(Replace ... with the id you need.)

subtenante
Shouldn't that be removeAttr('onclick')?
Roatin Marth
Yep, good point, might be cleaner, but I'm not sure it would be different from execution point of view.
subtenante