I
I
Igor2015-11-03 21:47:43
css
Igor, 2015-11-03 21:47:43

Why is JS curtain not working?

The best answer was given by Vitaly!
hammerk^_^

$(".mc_item_wrap").click(function(){
 
            $(this).children("ul").slideToggle();
});

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Denis Bukreev, 2015-11-03
@IgorBee

in general, all your uls fall into the selection,
try to go to the parent once
$(this).parent("li").children("ul")

D
Dmitry Snytkin, 2015-11-03
@dima11221122

the selector $(this).parent().parent().children("ul") returns an empty array. Maybe this will push you.

D
dk-web, 2015-11-04
@dk-web

Now everyone sees Vitaly's answer and wonders what kind of curtain ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question