javascript - Jquery - how to use $() -
How do I change the following javascript to use JQuery?
document.getElementById ("ASC") removeAttribute (. "Href"); Document.getElementById ("asc"). Onclick = ""; I think I am using the code below, but it does not work quite previous> $ ('# asc'). Attr ('href', '') .click (function () {return false}). CSS ('text-decoration', 'underline');
The only difference I can see is that href
The attribute is not actually being removed
This will remove the attribute instead:
$ ('# acc'). RemoveAttr ('href'). CSS ('text-decoration', 'underline');
If there is already a onclick
handler, try it out:
$ ('# asc'). RemoveAttr ('Href'). Etr ('onclic', ''). CSS ('text-decoration', 'underlined');
Comments
Post a Comment