I am really new to jQuery. I am working on a little project.
I am making a application where I have 4 Divs with different IDs. I have a input box on the start where the user should be able to write the ID of the DIV user want to apply all the functions to. Next is another input box where the user will be able to write some text to the selected DIV. After that there are 4 other functions: Slide up, Slide down, Fade out and Fade in. All these functions should only work with the DIV name which is written in the first input box.
Right now I have just figured out how to get the 4 functions like slide up, slide down, fade out, fade inn work on all 4 DIVs together, but cant figure out how to get the input boxes to work properly for each of the DIVS.
Can you please help me with this?
Here is my html code:
<div class="myDivs" id="div1"></div>
<div class="myDivs" id="div2"></div>
<div class="myDivs" id="div3"></div>
<div class="myDivs" id="div4"></div>
Here is my fiddle:
Aucun commentaire:
Enregistrer un commentaire