Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #800276

    Hello!

    Big fan of Enfold, but having trouble with formatting the LayerSlider I’ve created when viewing the site with left sidebar menu and logo on the home page. You can see, it gets cut off. What do I adjust to make slider responsive to the new width of the main content area. Thanks!

    #800379

    Hey rdtjosh,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look.

    Best regards,
    Victoria

    #800398

    Sure

    #800526

    Hi rdtjosh,

    Layer Slider width calculations don’t know that you have a menu on the side, so they kind of think the have those 300px. Let’s try to adjust the controls.
    Here is the code you can put in your funtions.php

    
    add_action('wp_footer', 'avia_adjust_ls_width_script');
    function avia_adjust_ls_width_script(){
    ?>
    <script type="text/javascript">
    (function($) {
    	jQuery(window).on("load", function(e) {
    		jQuery("#layerslider_1").css("width", window.innerWidth-300);
    	});
    	jQuery(window).on("resize", function(e) {
    		jQuery("#layerslider_1").css("width", window.innerWidth-300);
    	});
    })(jQuery);
    </script>
    <?php
    }
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #800658

    Victoria, I appreciate the help but for some reason, when I paste this code at the end of functions.php, I get an error… Am I pasting this in the right place? (Sorry, not a coder ;)

    #800711

    Hi,

    May you send to us a screenshot of the error that you`re getting?

    Best regards,
    John Torvik

    #800897

    Hmm, I tried pasting the code again today and it is not showing the error. However, the code does not seem to be affecting the slider appearance. Can you log in and take a look?

    #801770

    Hi,

    We modified the code in the functions.php file.

    
    // layer slider width fix
    function ava_custom_script_mod(){
    ?>
    <script>
    (function($){
    	$.fn.layer_slider_width_helper = function(options)
    	{
    		return this.each(function()
    		{
    			var container = $(this),
    					main      = $('#main').innerWidth(),
    					first_div = container.find('.ls-wp-container'),
    					timeout 	= false,
    					counter 	= 0,
    
    			reset_size = function()
    			{
    				if(first_div.innerWidth() > main || counter > 5)
    				{
    					first_div.width(main);
    				}
    				else
    				{
    					timeout = setTimeout(reset_size, 1000);
    					counter++;
    				}
    			};
    
    			console.log('ls-resize');
    
    			if(!first_div.length) return;
    
    			timeout = setTimeout(reset_size, 0);
    		});
    	}
    
    	$(window).on('load resize', function() {
    		$('.avia-layerslider').layer_slider_width_helper();
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'ava_custom_script_mod');
    

    Best regards,
    Ismael

    #804751

    Thanks for trying to help. I did not like how the slider was behaving so I decided to revert back to the menu placement on top, rather than side menu. I would like the slider to behave the way it did originally. It still resizes oddly when the browser is maximized or stretched fully horizontally- the layered objects are off to the left. I removed the custom code from the functions.php file, but it is still not reverting. Please help… thank you.

    #804753

    I have linked a screenshot of how the slide is designed in LayerSlider to compare to the current site home page- you can see that the layers are not arranged the same way…

    #804810

    Hi,

    It looks quite alright in my end. Please check the screenshot of the frontend.

    View post on imgur.com

    Best regards,
    Ismael

    #805727

    Please see this screenshot: http://imgur.com/a/2CAcS

    The navigation buttons are off to the right- the right arrow is not even visible. I believe this is an issue of the viewing area not being the same as the slide template I designed?

    #807034

    Hi rdtjosh,

    You should really consider updating your php to php7. Layer Slider and other plugins rely on that.

    Best regards,
    Victoria

    #807039
Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.