toggle - JQuery - SlideToggle Multiple DIVs at the same time? -


I'm new to JQuery and I have a little bit of an OCD issue.

I use the slider to use the click functions / bins to show a box, though the division inside it does not slide with it, it just looks.

Is there a way that I can slide together in both divs?

JQUERY:

  & lt; Script type = "text / javascript" & gt; $ (Document). $ ("# Store_container") {$ ("# store_container") $ ('# Toggle'). Click $ ('(' # Store_container ')) (function () {$ (' # store_container ') SlideToggle ("slow"); Description is false;}); }); & Lt; / Script & gt;  

HTML:

  & lt; Div id = "store_container" style = "display: none;" & Gt; & Lt; Div id = "store_data" & gt; & Lt; P & gt; This is an exam & lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

Try it out:

  & lt; Script type = "text / javascript" & gt; $ (Function () {$ ("# store_container"). Hide (); $ ('# toggle') Toggle (function () {$ ('# store_container') Slide Down ("slow", function () {$ ('# Store_data') .FadeIn ();})}}, function () {$ ('# store_data') .FadeOut ("fast", function () {$ ('# store_container'). "Slow");});});}); & Lt; / Script & gt; & Lt; Div id = "store_container" style = "display: none; height: 300px;" & Gt; & Lt; Div id = "store_data" style = "display: none;" & Gt; & Lt; P & gt; This is an exam & lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -