Hi Justin, I’m trying to replicate your problem, but unfortunately I can’t (Chromium 28 on Linux). I’ve never heard of this problem happening before, so I’m not sure how to fix this. One thing you could try is artificially triggering a window resize event when the document has loaded.
Try this:
Open the site in Chrome, and open the web inspector console (Shift + Ctrl + J). If this made your webpage resize… reload the page. Then, type into the prompt: jQuery(window).trigger(‘resize’) or alternatively jQuery(window).resize();
(It should trigger a window resize, without actually resizing your browser..)
Let me know how this works out!
I have a similar problem, my tiles DO show but at the wrong size. A re-size makes the tiles shift and look right.
That command in the web inspector console works perfectly but I do not know how to make that happen for visitors after page load.
Thanks
@northlion: As per the Forum Welcome, please post your own topic. Added to which, your problem is completely different.
I did as well.. I just read this and saw that it was re-size related and thought it might be related. Sorry.
Thread Starter
j w
(@justinmwoodum)
@mike The inspector kept crashing on page reload (does this on other pages as well – maybe a Chrome extension issue…). Anyways, placing the code you shared above in the plugin’s code worked. Would love to see this added to the next release. Thanks!
@mike @northlion To make “WP Tiles 0.5.1” WordPress plugin load the grid successfully on page load with “Chrome Version 28.0.1500.72 m” web browser, I…
- Accessed the site’s files via FTP.
- Edited the file “[site folder]/wp-content/plugins/wp-tiles/_inc/js/wp-tiles.js”.
Before the last line (line 152) that says…
})(jQuery);
Add…
jQuery(window).trigger(‘resize’);
So it looks like…
jQuery(window).trigger(‘resize’);
})(jQuery);
Spacing is unimportant.
- Saved file & uploaded to same place/same name via FTP.
- To test, cleared Chrome’s cache & navigated to page where WP Tiles is used.
Worked like a charm! Thank you! ^^
Thanks Justin! I will roll out a plugin update tonight. I still haven’t been able to reproduce it so I’m very happy this bug resolved now.
Cheers,
Mike