Use jQuery SlideToggle to Show/Hide Multiple Rows or Divs
In this tutorial a set of links control the visibility of a number of corresponding divs or rows. It uses jQuery’s slideUp and slideToggle sliding effects. I have used a list as the triggers that will open close the corresponding div/row – clicking a different list item will close the open content and open the relevant…
Read MoreFind and Trump Z-Index on all Elements on a Page with jQuery
The jQuery snippet below will search all HTML elements on a page and find the element with the highest z-index value and capture that value in a variable – then using the .css function in jQuery, assign and increment that value by 1 to a selector you have chosen.
Read MoreCreate a Expand/Collapse FAQ Accordion, Collapse other on Click
This guide creates a FAQ expand/collapse javascript question and answer set up whereby when another question is expanded the current open answer is collapsed. So only one is expanded at any point. In the example below click to see how it works. I have changed it to better work in the WordPress post editor – but can be used in…
Read MoreCreating a FAQ Page in WordPress using ACF and jQuery
How to create a FAQ page in WordPress using Advanced Custom Fields and jQuery. ACF (Advanced Custom Fields) Pro comes with a great inclusion called the Repeater field which allows a user to continually add additional rows of data of certain custom fields to a page or post (or custom post type) in WordPress. This can be an ideal client…
Read MoreStop video playing when Bootstrap modal is closed
If you add a video to a Bootstrap Modal and either dismiss or close the modal whilst the video is playing the video will keep on playing.You can adjust this behaviour by adding in some Bootstrap javascript/jQuery that acts to stop the video if either the modal window is either clicked to close or the…
Read More