Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 22. Nov 2024, 23:02

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 15. Feb 2016, 19:28 
Offline

Joined: 10. Feb 2016, 20:21
Posts: 3
I use this plugin - https://wordpress.org/plugins/async-js-and-css/ - to adjust all of the CSS and JS loaded by the other plugins on my site into an asynchronous load at the bottom of the page.

I have Advanced Iframe set up to "Resize on Element Resize" - and this is working great - until I activate the Async Plugin.

I see that the jQuery designed to Resize on Element Resize is written onto the page directly where the iframe exists.

When I turn on Async - essentially what is happening - is that jQuery itself does not load before your code in the page for this height detection.

Would it be possible to move the size detection code into an external js file that is called to the page using wp_register_script? If this was done - this script would also be loaded asynchronously - which would allow it to run with the Async plugin active.

Thanks


Top
 Profile  
 
PostPosted: 15. Feb 2016, 22:18 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
The script (jquery.ba-resize.min.js) is loaded with wp_enqueue_script and has a dependency to jquery for the same domain.

Do you use resize on element resize for the same domain or with the external workaround?

Best, Michael


Top
 Profile  
 
PostPosted: 16. Feb 2016, 14:55 
Offline

Joined: 10. Feb 2016, 20:21
Posts: 3
Same domain

I see the following code written directly onto the page - and my java console is showing me that this is where the failure is happening


jQuery("#event_iframe").contents().find(".image_rotation").resize(function(){
aiResizeIframe(ifrm_event_iframe, "false","1");
});


Top
 Profile  
 
PostPosted: 16. Feb 2016, 16:51 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
but this is the call of the function. Not where the Script is defined.
This is done fte rthe onload event of the iframe.

If you enable the other plugin - can you look when jquery and when the resize script is loaded?

If the onload event is called before the scripts are loaded than you cannot use the asnc plugin as
the onload event is the trigger for everything.

Best, Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
powered by phpbb | Datenschutz/ Privacy policy