The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

toggle shows all drop downs

View previous topic View next topic Go down

toggle shows all drop downs

Post by IdaTR on 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)
avatar
IdaTR
Forumember

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

http://www.vielamort.net

Back to top Go down

Re: toggle shows all drop downs

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

Bump
avatar
IdaTR
Forumember

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

http://www.vielamort.net

Back to top Go down

Re: toggle shows all drop downs

Post by SLGray on 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.


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40197
Reputation : 2716
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Re: toggle shows all drop downs

Post by levy on 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.
avatar
levy
Hyperactive

Male Posts : 2586
Reputation : 346
Language : Romanian, English
Location : criticize artwork, not people!

http://help.forumotion.com/

Back to top Go down

Re: toggle shows all drop downs

Post by IdaTR on 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?
avatar
IdaTR
Forumember

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

http://www.vielamort.net

Back to top Go down

Re: toggle shows all drop downs

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

Bump
avatar
IdaTR
Forumember

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

http://www.vielamort.net

Back to top Go down

Re: toggle shows all drop downs

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

bump
avatar
IdaTR
Forumember

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

http://www.vielamort.net

Back to top Go down

Re: toggle shows all drop downs

Post by APE on 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



avatar
APE
Manager
Manager

Male Posts : 10662
Reputation : 996
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

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

Back to top Go down

Re: toggle shows all drop downs

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

I see... thanks!
avatar
IdaTR
Forumember

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

http://www.vielamort.net

Back to top Go down

View previous topic View next topic Back to top


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