2

I have a script that only seem to start when I resized the browser. I can't find out why and start to be short on time. So i was wondering if I could simulate the browser to resize after the page load to it could fire the script and then bring the browser resolution back to what it was.

Is this possible ?

edit

Ok now the script work if I load the page from a link in the menu, but fails if I click the browser's refresh button.

1
  • 1
    Why is the script started when you resize the browser? Figure out that reason and post the code. Trying to force it to do something that it wasn't designed to do is a good way to cause yourself a lot of frustration.
    – zzzzBov
    Jan 30, 2013 at 20:09

1 Answer 1

14

Just trigger the resize event:

$(function () {
    $(window).resize();
});
1
  • That's exactly what I'm calling and it's working by the carouFredSel don't fire onload... only when I resize. Weird
    – Warface
    Jan 30, 2013 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.