javascript - How do I get this class name via jQuery? -
Trying to create an Ariane, but I do not have to find out if the wrapper has an active class or not.
My jQuery:
$ ('.faq_wrap span.plus'). (Clickclick, function (e) {var topEl = $ (this) .closest ('.FAQ_wrap' '(TopEl.hasClass (' active ')) (topEl.removeClass (' active '); topEl.find (' Reply ') .SlideUp (' sharp '); return false;} topEl.each (function (index, L) {topEl.removeClass (' active '); topEl.find (' reply '). SlideUp (' sharp ' );); TopEl.find ('reply'), slide down ('sharp'); TopEl.addClass ('active'); console.log (topEl);}); Here is the output from console.log :
I'm trying to check that Or .faq_wrap.active already exists or not. If this happens then slide the arrondissement before sliding down a new one. As of now, this check is ignored and I can open several accordions as many times as I like?
Use
topEl.get (0) .className
Comments
Post a Comment