Screenshot of show/hide buttons |
I'm Phil Bainbridge and I aim to share my experiences of IT projects I've worked on as I continue to learn and develop, through this blog. My main coding language is Google Apps Script (with JavaScript), but there is also some: PowerShell, HTML, SQL and jQuery.
Tuesday, 4 February 2020
Create buttons to hide/show text in jQuery
The following jQuery code is designed to have 2 buttons - 1 which hides the webpage text and the other which shows it again.
Each button has its own 'id' name depending on which task it will perform: show or hide. We use the '#id Selector' to target each id and use the 'click' method to either 'show/hide' all elements within a paragraph (<p>) tag.
Create buttons to hide/show text in jQuery
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment