1
Mazar
Hi can i use a jquery function to add class to my navbar?
  • 2009/10/12 14:16

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


I have been trying to add a class to my navbar links dynamically with jquery onclick function
so i can highlight the current active link
but it is not assigning the class on navbar in theme.html
le="color: #000000"><?php $(document).ready(function() { $('#jsddm').click(function() { $(this).removeClass("selected"); $(this).addClass("selected"); }); }); <ul id="jsddm"> <li><a href="<{$xoops_url}>">Home</a> </li> <li><a href="<{$xoops_url}>/modules/topics/index.php">topics</a></li> </ul>

2
bjuti
Re: Hi can i use a jquery function to add class to my navbar?
  • 2009/10/12 15:41

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


Try replace "$" with "JQuery"

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!