SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jquery toggle keeps repeating on the second tab.

    here is my code:
    Code JavaScript:
    // hide the content
      $(".maintitles_jd").hide();
     
      $(".dad h3").click(function(){
        $(this).next(".maintitles_jd").stop(true, true).slideToggle()
         .siblings(".maintitles_jd:visible").stop(true, true).slideUp();
        $(this).stop(true, true).toggleClass("active");
        $(this).siblings(".dad h3").removeClass("active");
      });
    });

    The code above is working fine on the first tab, but when a second tab is generated and when clicked on toggle div it keeps repeating.

    Help!
    Last edited by cpradio; Apr 16, 2013 at 08:05. Reason: Added tags


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •