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
$(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

Who's Online

119 user(s) are online (86 user(s) are browsing Support Forums)


Members: 0


Guests: 119


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits