I would like to add a button to display more information if the respondent wants to see. By default the details will be hidden and on clicking the button it should toggle between displaying the details and hiding it again. How can it be done?
I have found the code on how to do it using JS but dont know how to make it work using Jquery.
It is the fourth answer in the link..
Hide and show text by click on div
Solved
Button to toggle and display more text
Best answer by TomG
JS:
jQuery("#button").click(function() {
jQuery("#infodiv").toggle();
});
HTML:
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.