Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    This is being added in v1.4 but isn’t gonna be ready for release til late march.

    Do the modals use similar content?

    Thread Starter james@impelmedia.co.uk

    (@jamesimpelmediacouk)

    Thanks, pretty similar but not exact content. I think its the google map in each modal that is causing the issue.

    Plugin Author Daniel Iser

    (@danieliser)

    If you are using a plugin to add the maps we can’t do much about that but if you are adding the code manually you could instead of initializing the maps on page load, initialize them when the modal is opened. This would greatly speed that up.

    Also if your using a plugin chances are that Ajax loading the modals will not work as most plugins only initialize when the page loads which means the maps won’t work either. This is the reason we went away from ajaxing modals in v1 because forms and other plugins wouldn’t work properly unless they were preloaded in the footer.

    Thread Starter james@impelmedia.co.uk

    (@jamesimpelmediacouk)

    thanks very much fot you help, I am adding the googmap code to each modal manually. Can i be a pain and ask how i could tell the map to load only when the modal is opened. Sorry for my ignorance.

    Plugin Author Daniel Iser

    (@danieliser)

    Not a problem. You can over ride the opening of a modal using JavaScript. Something like this should work.

    jQuery('.eModal-1').click(function(e){
        e.preventDefault();
        // do your maps code for this modal
        jQuery('#eModal-1').emodal('open');
    });

    Since you have so many you could either write a function like this for each or write a single function that can detect the modal id and initialize the correct map.

    Let me know of you get stuck.

    Thread Starter james@impelmedia.co.uk

    (@jamesimpelmediacouk)

    Thanks again, so ijust drop this code in the modal text editor and then drop the iframe code for the map where you comment for it.

    Thanks

    Plugin Author Daniel Iser

    (@danieliser)

    You could try adding that to each modal inside a <script> tag. Best place would be to add them all to your themes .js file if it has one or create one if not.

    schmutly

    (@schmutly)

    On the issue of loading…my sites been excruciatingly slow and i couldnt work out why. Then i turned off the last few plugins till i found it was this one. According to http://gtmetrix.com/ its taking 18 seconds to load?
    WHY? turn it off and site loads in few secs.
    Only have 3 modals that load on a different page, and SET for that page…not SITE wide..so dont know why its affecting everything.
    Any ideas because there is no other plugin as good as this.
    Thank you,
    robbie

    UPDATE:
    I had a CLONE of one of my modals still set to SITEWIDE and i think i know whats wrong…the POPUP has many images in it to explain to customers how to add products and things like that.

    Can i please ask..is it possible to only LOAD this modal when its clicked? I’m not totally sure its this but I’d suspect so.

    schmutly

    (@schmutly)

    Daniel, that above code..where does it go?
    One of my modal windows is an image heavy instructions popup so i need that content only to load if they click on the button..The above code should do it? And placed where? At the moment it takes 10 secs to load the page because of the content and images in the modal window, and iss there a way to make it cached so its not needed to load each time they visit the page?
    Thanks muchly,
    Rob

    Plugin Author Daniel Iser

    (@danieliser)

    Hey Schmulty, You may wanna look at jquery lazy loading images in general. It will prevent images from loading if they arnt on screen.

    A quick google search turned up this.

    http://wordpress.org/plugins/bj-lazy-load/

    schmutly

    (@schmutly)

    Ok…ill give that a try, thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Lazy Load’ is closed to new replies.