I have the following code:
front_page_magic();
$(window).resize(function() {
front_page_magic();
});
All the magic happens within front_page_magic()
, although whenever I load the page the resize function also gets called which creates some whacky and slow behaviour as the function is been called twice in quick succession.
Is this something which is related to certain browsers too?
I though $(window).resize() was only relative to the resizing of the browser window, and had nothing to do with page load/refresh?