+ 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 });
1 ответ
+ 8
fixed code:
$(document).ready(function() {
$(“#TheDivThatIsShow”).show();
$(“#TheDivThatIsHide”).hide();
$(“#TheId”).click(function() {
$(“#TheDivThatIsShow”).hide();
$(“#TheDivThatIsHide”).show();
});
});