javascript - Toggle div $this without toggling another with same class -
How can I toggle this divs Without having toggle the contents with the same class?
HTML:
& lt; Div class = "panel" & gt; & Lt; Div class = "pane-header" & gt; Settings & lt; Div class = "pane-control" & gt; & Lt; Span class = "pan-toggle" & gt; & Lt; I class = "fa fa-chevron" & gt; & Lt; / I & gt; & Lt; / Span & gt; & Lt; I class = "fa-fa-times" & gt; & Lt; / I & gt; & Lt; / Div & gt; & Lt; Div style = "clear: both;" & Gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "panel-content" & gt; Laurium Ipsum & lt; / Div & gt; & Lt; / Div & gt; JS: $ ('panel-toggle'). Toggle Class ("FA-Chevron-Dow Fa-Chevron Up");} (Toggle Class) ($ ('.pace-content'). Toggle ('sharp'), $ ("i", this). ); Try
-
$ ('. 'Pane -content', $ (this) .closest ('pane.') Fast ')) to turn on (.';
demo ----- & Gt;
Comments
Post a Comment