Skip to main content
Participating Frequently
September 30, 2009
Answered

Resize on complete????

  • September 30, 2009
  • 1 reply
  • 722 views

Hey guys,

I want to do something very similar to the resizing effect on this website.

http://www.emrahelmasli.com/site.html

Basically if you resize the browser, it seems like it's programmed to only display/load/transition in the images once the user lets go of the mouse and the browser is done moving.

I would like to know if there is a Resize on mouse release event or a work around to do this. Currently my images keep refreshing every time you drag/resize the browser screen, before you let go of the mouse.

So basically while your dragging the browser window size to different size it keeps reloading and updating the images. I want it to reload and update the images once the user is done dragging and resizing the browser.

Let me know if this is clear or not.

Thanks.

This topic has been closed for replies.
Correct answer kglad

that site uses a timer and does not detect a mouse up.  (you must have a shakey hand if you can't get it to resize while still dragging.)

1 reply

kglad
Community Expert
Community Expert
September 30, 2009

use a resize listener that clears a setTimeout and assigns a setTimeout.

heato112Author
Participating Frequently
September 30, 2009

I started to use that which for the most part works well. But it still executes after a second while the user is still holding the browser in drag mode. The example site, doesn't load until the user releases the mouse button. I tried a mouse down/up listener but it is out the browser and doesn't detect it. This part isn't a big deal though but it would be good to know how they executed that functionality as well. Thanks for the help.

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
September 30, 2009

that site uses a timer and does not detect a mouse up.  (you must have a shakey hand if you can't get it to resize while still dragging.)