Shortcodes and JQuery Ready
-
Hello,
I’ve been having issues with my accordions not accordioning. I’m using the accordion shortcode version and there are 0 JS errors being reported.
After jumping into the code I was able to get the script to work by changing the following:
$( document ).on( 'ready', function() { /* Code */ } );to
$( document ).ready( function() { /* Code */ } );After talking with some JQuery folx, they don’t think that
on( 'ready' )is an event that actually fires. They pointed me to the ready.js Github where there’sDOMContentLoadedandloadbut notready.Is there a reason why to use
on( 'ready' )vs just.ready()?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Shortcodes and JQuery Ready’ is closed to new replies.