«« Next » « Previous
«« Next » « Previous

Link Details

Do we have to spell it out? Okay... V-O-T-E! Login and vote now.
Link 81839 thumbnail

By mmurph211
via matts411.com
Submitted: May 19 2008 / 22:51

I ran across an issue the other week where an onScroll JavaScript function was being called too often and I needed to figure out a way to execute it only when needed. Knowing that the code was mainly intended for post-scrolling execution, I came up with this idea* of setting and resetting a timeout again and again until the actual event finished and the set timeout fired the real code. So far it seems to be working great so I thought I'd share.
  • 1
  • 0
  • 127
  • 13

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (1)



Voters Against This Link (0)