Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #286804

    Hello,

    I am curious of I can hide a specific layerslider slide on mobile devices? If not, can I have a fallback image for a layerslider on a specific slide. It is on a video slide and it takes to long to load on mobile devices…

    Please advise…

    Thank you

    #286931

    Hi!

    This is a little bit more harder than normal CSS hiding, but i got an idea that may do the trick, add the following to the theme functions.php:

    function add_custom_script(){
    ?>
    <script>
    jQuery(function(){
    	if(jQuery.avia_utilities.isMobile){
    		jQuery("#nomobileslide").remove();
    	}
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');
    

    Set the unwanted layer an ID of “nomobileslide”.

    Cheers!
    Josue

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.