HTML:
<a id="foo" href="#" class="btn btn-default btn-lg disabled" role="button">Link</a>
<a id="bar" href="#" class="btn btn-default btn-lg" role="button">Link</a>
jQuery:
$("#foo,#bar").click(function(e){
e.preventDefault();
alert('click');
});
The alert appears when clicking #bar
, but not when clicking #foo
. How can I fix this? Thank you.
Fiddle: http://jsfiddle.net/VVw8S/