JQuery Question: How do I do this?

Concerning this:
$(‘div.menupanel’).slideToggle(‘slow’, function() );

But Concerning multiple div.menupanels plus I exclusively want the ones with a certain ID (which they all have), being effected.
Any help

1) while you do not need get this working, always you should definitely wrap feature values throughout double rates.
so your own markup need to be like

2) U’re misunderstanding the concept of identifiers.Fat loss have 2 distinct elements on the page with the same inside diameter.An id need to be unique to one simple element, that’s the very purpose of an identifier.Essentially, what you might want to do is impart them with a special id, while having an index from it every single child target a particular id, as you’re endeavoring to do.

do this:

(repeat this countless times when you need)

then your own js signal should seem like this:


var currentID = $(this).attr(‘id’).replace(‘header’, ”);

/* note that one could use almost any string adjustment here to get the number out of the id (for example you could get the continue character of the string, if you have less in comparison with 10 headers) just make sure it helpful */

$(‘#panel’ + currentID + ‘.menupanel’).slideToggle(‘slow’, function()

Leave a Reply