Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
138
rated 0 times [  142] [ 4]  / answers: 1 / hits: 103920  / 15 Years ago, wed, august 26, 2009, 12:00:00

Possible Duplicate:

How to change the href for a hyperlink using jQuery






I have this link:



<a id=myLink_33 href=javascript:toggleMe(1);>Toggle</a>


How can I change the href attribute of this link using Javascript/jquery so the link becomes this:



<a id=myLink_33 href=javascript:toggleMe(0);>Toggle</a>

More From » jquery

 Answers
39
$(#myLink_33).attr(href, javascript:toggleMe(0););

[#98833] Thursday, August 20, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
whitney

Total Points: 642
Total Questions: 110
Total Answers: 98

Location: Solomon Islands
Member since Mon, Jun 20, 2022
2 Years ago
;