Thursday 26 June 2014

How to add and remove attribute in JQuery..

Html tag :-
<button type='submit' class='leftArrow' id='btnPost' disabled='disabled'>Post</button>

Remove attribute in jquery--
 $('#btnPost').removeAttr("disabled");

Add attribute in jquery--
 $('#btnPost').attr("disabled", "disabled");

No comments:

Post a Comment