Digital experiences for all disciplines
Forum Replies Created
-
-
Hi Rui,
Yes you’re absolutely right, it’s a little trick on mobile. I managed with the code below, works on my local, not quite sure if it’s appropriate and should push to production
function denqueue_scripts_revslider_mobile { $output .= '<script> $(document).ready(function () { revapi1.bind("revolution.slide.onloaded",function (e) { revapi1.revkill(); }); }); </script>'; echo $output; } if ( wp_is_mobile() ) { add_action( 'wp_footer', 'denqueue_scripts_revslider_mobile', 100 ); }
Still no luck. Do I have the correct $handle?
Hi Rui,
Thanks for the reply. I tried, doesn’t work. Actually tried that before 😀
Is there some other way to implement this or maybe I did something wrong. I use the dante child theme and I have this in the functions.php file.
Thanks
I need the scrips deregisted only on certain pages or on mobile for example in the code below
function denqueue_scripts_revslider_mobile() { if ( wp_is_mobile() ) { wp_dequeue_script( 'jquery.themepunch.tools.min' ); wp_deregister_script( 'jquery.themepunch.tools.min' ); wp_dequeue_script( 'jquery.themepunch.revolution.min' ); wp_deregister_script( 'jquery.themepunch.revolution.min' ); } } add_action( 'wp_enqueue_scripts', 'denqueue_scripts_revslider_mobile', 100 );
-