Why this dosent work? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why this dosent work?

I have the IDs with divs and sections and a button then I put in JQuery: $(“#TheId”).click(function() { $(“#TheDivThatIsShow”).hide $(“#TheDivThatIsHide”).show }); $(document).ready(function() { $(“#TheDivThatIsShow”).show $(“#TheDivThatIsHide”).hide });

29th Mar 2018, 2:34 AM
Octavio Aguayo
Octavio Aguayo - avatar
1 Answer
+ 8
fixed code: $(document).ready(function() { $(“#TheDivThatIsShow”).show(); $(“#TheDivThatIsHide”).hide(); $(“#TheId”).click(function() { $(“#TheDivThatIsShow”).hide(); $(“#TheDivThatIsHide”).show(); }); });
29th Mar 2018, 4:53 AM
Amethyst Animion
Amethyst Animion - avatar