Forum Replies Created

Viewing 5 posts - 16 through 20 (of 20 total)
  • Posted in:
  • in reply to: Deregister Revolution Slider scripts #195715
    Kauf
    Member
    Post count: 22

    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 );
    }
    in reply to: Deregister Revolution Slider scripts #195693
    Kauf
    Member
    Post count: 22

    Still no luck. Do I have the correct $handle?

    in reply to: Deregister Revolution Slider scripts #195686
    Kauf
    Member
    Post count: 22

    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.

    in reply to: Disable Revolution Slider on Mobile, not hide #195680
    Kauf
    Member
    Post count: 22

    Thanks

    in reply to: Deregister Revolution Slider scripts #195677
    Kauf
    Member
    Post count: 22

    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 );
Viewing 5 posts - 16 through 20 (of 20 total)