The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

toggle shows all drop downs

4 posters

Go down

toggle shows all drop downs Empty toggle shows all drop downs

Post by IdaTR July 25th 2014, 12:55 am

Code:
$(function () {
  $('.click-nav > ul').toggleClass('no-js js');
  $('.click-nav .js ul').hide();
  $('.click-nav .js').click(function(e) {
    $('.click-nav .js ul').slideToggle(200);
    $('.clicker').toggleClass('active');
    e.stopPropagation();
  });
  $(document).click(function() {
    if ($('.click-nav .js ul').is(':visible')) {
      $('.click-nav .js ul', this).slideUp();
      $('.clicker').removeClass('active');
    }
  });
});

I want this to only slide down ONE toggle at a time, if the toggle is clicked on, is another toggle is open it should close, but how do i but that into this code?

version: PHPBB3
website: www.Vielamort.net (the Quick links)
IdaTR
IdaTR
Forumember

Female Posts : 547
Reputation : 1
Language : Danish, english
Location : Denmark

http://www.vielamort.net

Back to top Go down

toggle shows all drop downs Empty Re: toggle shows all drop downs

Post by IdaTR July 27th 2014, 9:23 pm

Bump
IdaTR
IdaTR
Forumember

Female Posts : 547
Reputation : 1
Language : Danish, english
Location : Denmark

http://www.vielamort.net

Back to top Go down

toggle shows all drop downs Empty Re: toggle shows all drop downs

Post by SLGray July 27th 2014, 9:25 pm

I believe you will have to create a code for each one that you want to have a drop-down menu.


toggle shows all drop downs Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51482
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

toggle shows all drop downs Empty Re: toggle shows all drop downs

Post by levy July 27th 2014, 9:29 pm

Hi,
How SLG already said, you need to create for each of them different codes and also, you need to have classes different for all.
levy
levy
Hyperactive

Male Posts : 2632
Reputation : 350
Language : English, Romanian
Location : Romania

https://portofolio.goodforum.net/

Back to top Go down

toggle shows all drop downs Empty Re: toggle shows all drop downs

Post by IdaTR July 27th 2014, 9:38 pm

isn't it possible to make just one code which can do that?
Like the Toogle for the categories?
IdaTR
IdaTR
Forumember

Female Posts : 547
Reputation : 1
Language : Danish, english
Location : Denmark

http://www.vielamort.net

Back to top Go down

toggle shows all drop downs Empty Re: toggle shows all drop downs

Post by IdaTR July 29th 2014, 12:50 pm

Bump
IdaTR
IdaTR
Forumember

Female Posts : 547
Reputation : 1
Language : Danish, english
Location : Denmark

http://www.vielamort.net

Back to top Go down

toggle shows all drop downs Empty Re: toggle shows all drop downs

Post by IdaTR August 6th 2014, 10:47 pm

bump
IdaTR
IdaTR
Forumember

Female Posts : 547
Reputation : 1
Language : Danish, english
Location : Denmark

http://www.vielamort.net

Back to top Go down

toggle shows all drop downs Empty Re: toggle shows all drop downs

Post by Ape August 7th 2014, 12:06 am

As already said No this will have to have a code for each one.
and to do that will tale a lot of codes and may also slow your site down lots


toggle shows all drop downs Left1212toggle shows all drop downs Center11toggle shows all drop downs Right112
toggle shows all drop downs Ape_b110
toggle shows all drop downs Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19110
Reputation : 1991
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

toggle shows all drop downs Empty Re: toggle shows all drop downs

Post by IdaTR August 13th 2014, 6:43 pm

I see... thanks!
IdaTR
IdaTR
Forumember

Female Posts : 547
Reputation : 1
Language : Danish, english
Location : Denmark

http://www.vielamort.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum