Current time: 08-13-2020, 05:15 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with load times
09-11-2014, 02:11 PM (This post was last modified: 09-11-2014 09:16 PM by Enduring Epilepsy.)
Post: #12
RE: Help with load times
(09-11-2014 01:59 AM)pmeenan Wrote:  Looking at the panels, it looks like each one has this chunk of script embedded:

Code:
jQuery(window).load(function(){
    Shadowbox.init();
    jQuery(".cx-featuredimage a").hover(function(){
        jQuery(this).parent().addClass("highlight",{duration:500});
        jQuery(this).find("img").stop().css("opacity",0.5);
        jQuery(this).closest("div").find(".zoomin").stop().css("opacity","1");
        jQuery(this).closest("div").find(".zoomin").css("margin-right",-1*(jQuery(this).find("img").width()/2));
        jQuery(this).closest("div").find(".zoomin").css("margin-top",jQuery(this).find("img").height()/2);
        jQuery(this).closest("div").find(".zoomin").css("margin-left",jQuery(this).find("img").width()/2);
    },function(){
        jQuery(this).closest("div").find(".zoomin").stop().css("opacity",0);
        jQuery(this).parent().removeClass("highlight",{duration:500});
        jQuery(this).find("img").stop().css("opacity",1);
    });
});

It looks like most of that code is handling the zoom-on-hover but the Shadowbox.init() might be the code that is triggering the actual display.

For starters, that chunk of code looks like it is generic and should not be attached to every single one of the posts. You probably only need it once. You also don't want to attch it to the window load event. If you change the jQuery(window).load to jQuery(document).ready it should display the panels a lot sooner.

Ok - I finally found it but I'm not sure how to edit the JS...

JS code

Here is the masonry file MasonryGrid.php

Masonry CSS

The JS was buried in my Minify Cache file. I recognized the Shadowbox in the code, but am not sure how it's written Huh If I edit the Masonry code with document or container, it works, but I lose the CSS styling. Can you advise on how to properly edit this? Or do I need to shut off my minify to do so? Thank you for all the help Smile
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Help with load times - Enduring Epilepsy - 08-26-2014, 02:35 PM
RE: Help with load times - ajm_76 - 09-04-2014, 05:26 AM
RE: Help with load times - ajm_76 - 09-09-2014, 12:41 AM
RE: Help with load times - pmeenan - 09-10-2014, 11:28 PM
RE: Help with load times - pmeenan - 09-11-2014, 12:58 AM
RE: Help with load times - pmeenan - 09-11-2014, 01:59 AM
RE: Help with load times - Enduring Epilepsy - 09-11-2014 02:11 PM
RE: Help with load times - pmeenan - 09-11-2014, 10:18 PM
RE: Help with load times - ajm_76 - 09-12-2014, 03:24 AM
RE: Help with load times - pmeenan - 09-12-2014, 12:09 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)