jquery changing multiple elements on click -


Scratched my head over it for a while. Actually I have an external diva container and when the click is removed on that division, then I am trying to change it below: div class = "selected" (which works) ul And I'm trying to slide the toggle and the icon I is trying to switch to this class. ToggleClass

UL and is not sure icons are not firing that I'm doing wrong here and oddly when I switch the icon from Divi am, then I actually icon and hidden UL But I can toggle the square But for some reason when I move both of my trigger divider forward, it fails.

Jeffield:

Code below:

CSS:

  ul.more {display: none; }   

HTML:

& lt; Div class = "wtf" & gt; & Lt; Div & gt; & Lt; I class = "icon-right-chevron-right" & gt; & Lt; Span class = "docu-title"> gt; & Gt; Advertisement & nbsp; & Nbsp; & Nbsp; & Gt; & Lt; / I & gt; & Lt; Ul class = "more actu-landing-list" & gt; & Lt; Li & gt; Thanks to sit in as producer of any kind to use advertising to website Cross Quiz Maur ID dollars Android Works, after reminding me, working on a small scale are Nuelm a Pouare Felice any longer Also, to move the list of type, at any point of time, is not known at any time for any time. Chartering a Private Jet For Your Employees Either pay more for further time. Now for any time, all the places can not be taped in any way should not be done in any way by Płarresek Norna Nuke, Mattis a Sectorter Wootpate, Texas no. Cubitur pulvinar vivre luce, fossibs hendreate arcu element nuke. & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;

JS:

  $ (document) .ready (function () {$ ( '. Wtf div'). On ( 'click', changeCarrotClass3 );}); Function ChangeCart Class 3 () {$ (this) .toggleClass ("Selected"); $ (This) .next ('ul') slideToggle (400). $ (This) .next ('I') toggleClass ("icon-ygg-chevron-down"). }    

.next () really just looks next Element You want to use .find () , which appears on the lineage, because gt; and ; Ul & gt;

$ (This) .find ('ul') slideToggle (400). $ (This) .find ('I') toggleClass ("icon-ygg-chevron-down"). }



Comments

Popular posts from this blog

c# - Textbox not clickable but editable -

Matlab transpose a table vector -

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -