Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change link href via jQuery [duplicate]

Possible Duplicate:
How to change the href for a hyperlink using jQuery

I'm using Drupal and system generate my title.

E.G.

    <a class="jquery-once-3-processed" id="quicktabs-tab-galeri-1" 
href="/?q=node&amp;qt-galeri=1#qt-galeri">NEWS</a>

I want change this href link via jQuery. How can i do this? Thank you.

like image 714
Slaythern Aareonna Avatar asked Nov 29 '22 13:11

Slaythern Aareonna


2 Answers

$("#quicktabs-tab-galeri-1").attr("href", new_href);

That should do the trick for you.

like image 75
jxpx777 Avatar answered Dec 09 '22 19:12

jxpx777


$('#quicktabs-tab-galeri-1').attr('href', 'YOUR_NEW_HREF');

This selects the element with id quicktabs-tab-galeri-1 and changes its href attribute.

like image 36
Pablo Avatar answered Dec 09 '22 19:12

Pablo