WordPress.org

Support

Support » Plugins and Hacks » [Plugin: jQuery Image Lazy Load WP] Lazy Load images in tabbed content

[Plugin: jQuery Image Lazy Load WP] Lazy Load images in tabbed content

  • I’ve got a tabbed content slider on my home page, with thumbnail images of posts in each of the tabs. The code that runs the tabs is:

    jQuery(document).ready(function() {
    	    jQuery('.tabs-content:gt(0)').hide();
    		jQuery('#tabsNav li:first').addClass('active');
    		jQuery('#tabsNav li').bind('click', function() {
    			jQuery('li.active').removeClass('active');
    			jQuery(this).addClass('active');
    			var target = jQuery('a', this).attr('href');
    			jQuery('.tabs-content').hide();
    			jQuery(target).show();
    //			jQuery(document).scrollTo('+=1px', 8000, { axis:'y' });
    			return false;
    		});
    	});

    When I go to a new tab, the images won’t load until the user scrolls the page again. As you can see, I tried to manually trigger a scroll– which works, kinda.. except it throws the user to the bottom of the page.

    Is there a good way to trigger a scroll event, and load the images in these tabs, without actually scrolling the page?

    Or, is there a way to make the Lazy Load plugin listen for the click event on the tabbed content area, and load the images then?

    Any suggestions would be much appreciated.

    http://wordpress.org/extend/plugins/jquery-image-lazy-loading/

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: jQuery Image Lazy Load WP] Lazy Load images in tabbed content’ is closed to new replies.