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

    Hello, on my website monitoringjihadism.com I need the content slider on the home page to be visible immediately and not only after clicking on the slide number.
    You can see it in the charts section of the home page.
    Can you kindly help me?

    Tks Gianluca from Italy

    #1397388

    Hey sitibus,

    Thank you for the inquiry.

    We are not sure why the chart doesn’t display immediately on load, but you can try this script in the functions.php fille to trigger a window resize while the page is loading, which will hopefully force the chart to display.

    add_action('wp_footer', 'ava_auto_resize');
    function ava_auto_resize(){
    ?>
    <script>
    (function($){	
    	var int = window.setInterval(function(){
    		$(window).trigger('resize');
    	}, 1500);
    	
    	$(window).on("load", function () {	
    		setTimeout(function() {
    			clearInterval(int);
    		}, 500);
    	});
    })(jQuery);
    </script>
    <?php
    }
    

    Best regards,
    Ismael

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