jQuery Cycle Plugin Question

Out of context: Reply #10

  • Started
  • Last post
  • 13 Responses
  • Boz0

    here's what I do..

    I have nav items that are specific class.. like:

    $('myNavClass').click(function...

    this will assign the click to all elements of nav..

    When you click on it.. you use $(this).toggleClass('myNavClass...

    This will effectively highlight the one element you clicked on..

    before you assign toggleClass.. you want to reset all nav items back to their default class.. so you make a function resetNav() and you take all nav elements and reset to their default class THEN you assign the toggleClass thing only on the $(this) element..

    Makes sense?

View thread