-
Posted in : Responsy WP
-
Hi,
Its posible remove the filter ALL and open the first item?
See: http://www.plafo.com/new/?page_id=55
Thanks!
Ismael
Hi, paste the code below to the “External Stylesheet / Javascript” box under Theme Settings > Style;
<script> $(function() { $('#filters li').first().remove(); $('#filters li').first().find('a').trigger('click'); }); </script>Perfect!, but… I see all thumbails in the right (sorry my english)
http://www.plafo.com/new/?page_id=55
Thanks a lot!
Ismael
Hi, update the code;
<script> $(function() { $('#filters li').first().remove(); setTimeout(function() { $('#filters li').first().find('a').trigger('click')}, 1000); }); </script>I update the code but not working. See: http://www.plafo.com/new/?page_id=55
Hi, try this one;
<script> $(function() { $('#filters li').first().remove(); $('#portfolio').waitForImages(function() { setTimeout(function() { $('#filters li').first().find('a').trigger('click')}, 1000); },null,true); }); </script>Works! But… before loading all images, not only of Alb
is posible not wait for Images and only load the first images of the first departament?
Do you see this problem http://www.plafo.com/new/?page_id=55
I do not want to wait until the images are loaded. Because the website becomes slow. I want to load only the images of the first department.
Please helpme.
Thanks
Ismael
Hi, i see, update the code as;
<script> $(function() { $('#filters li').first().remove(); $('#filters li').first().addClass('current'); //********************************** // PORTFOLIO FILTERING - ISOTOPE // cache container var $container = $('#portfolio'); var $firstFilter = $('#filters li.current a').attr('data-filter'); var $firstCategory = $container.find('.item' + $firstFilter); if($container.length) { $container.find('.item:not(' + $firstFilter + ')').hide(); $firstCategory.waitForImages(function() { //initialize isotope $container.isotope({ itemSelector : '.item', layoutMode : 'fitRows', filter : $firstFilter }); $container.find('.item:not(' + $firstFilter + ')').show(); },null,true); } //********************************** }); </script>You are the best!
Thanks a lot!
Ismael
The forum ‘Responsy WP’ is closed to new topics and replies.