jquery Programming Glossary: debounce
Throttle AJAX Request On KeyUp and Paste Events http://stackoverflow.com/questions/10457743/throttle-ajax-request-on-keyup-and-paste-events function .ajax ... ... 500 You can also use throttle or debounce but I don't think it'd be necessary if you wrap your code inside..
stellar.js - configuring offsets / aligning elements for a vertical scrolling website? http://stackoverflow.com/questions/11051650/stellar-js-configuring-offsets-aligning-elements-for-a-vertical-scrolling-we var self this Debounce function from Underscore.js debounce function func wait var timeout return function var context.. .unbind 'scroll.stellarsite' .bind 'scroll.stellarsite' debounce handleScroll 500 else 'html body' .animate scrollLeft activeSection.offset.. .unbind 'scroll.stellarsite' .bind 'scroll.stellarsite' debounce handleScroll 500 10 window .bind 'mousewheel' function..
window.scroll function freezes firefox http://stackoverflow.com/questions/12428754/window-scroll-function-freezes-firefox using a library that have methods like throttle or debounce . http documentcloud.github.com underscore #throttle It's a..
How to temporarily disable a click handler in jQuery? http://stackoverflow.com/questions/1263042/how-to-temporarily-disable-a-click-handler-in-jquery before the div gets a chance to disappear. I want to debounce the button so that only the first click gets registered before..
Problems with Mobiscroll - orientationchange and access address bar crashes some mobile browsers http://stackoverflow.com/questions/13710834/problems-with-mobiscroll-orientationchange-and-access-address-bar-crashes-some index.php 2009 03 20 debouncing javascript methods var debounce function func threshold execAsap var timeout return function.. func threshold execAsap var timeout return function debounced var obj this args arguments function delayed if execAsap.. fn threshold execAsap return fn this.bind 'resize' debounce fn threshold execAsap this.trigger sr jQuery 'smartresize' function..
Facebook Style AJAX Search http://stackoverflow.com/questions/1568312/facebook-style-ajax-search a Debounce function at the bottom of all my scripts var debounce function func threshold execAsap var timeout return function.. func threshold execAsap var timeout return function debounced var obj this args arguments function delayed if execAsap .. And then whenever I do anything that will benefit from a debounce I can use it generically So your code would be re written as..
What is the simplest jQuery way to have a 'position:fixed' (always at top) div? http://stackoverflow.com/questions/257250/what-is-the-simplest-jquery-way-to-have-a-positionfixed-always-at-top-div performance issues. Consider using it with Ben Alman's debounce throttle plugin to reduce overhead. share improve this answer..
URL Encode a string in jQuery for an AJAX request http://stackoverflow.com/questions/6544564/url-encode-a-string-in-jquery-for-an-ajax-request
window.resize in jquery firing multiple times http://stackoverflow.com/questions/6658517/window-resize-in-jquery-firing-multiple-times index.php 2009 03 20 debouncing javascript methods var debounce function func threshold execAsap var timeout return function.. func threshold execAsap var timeout return function debounced var obj this args arguments function delayed if execAsap.. jQuery.fn sr function fn return fn this.bind 'resize' debounce fn this.trigger sr jQuery 'smartresize' usage window .smartresize..
Ways to throttle ajax requests http://stackoverflow.com/questions/6967785/ways-to-throttle-ajax-requests
Throttle AJAX Request On KeyUp and Paste Events http://stackoverflow.com/questions/10457743/throttle-ajax-request-on-keyup-and-paste-events label .on keyup paste function clearTimeout t t setTimeout function .ajax ... ... 500 You can also use throttle or debounce but I don't think it'd be necessary if you wrap your code inside a function object or string to pass to the setTimeout function...
stellar.js - configuring offsets / aligning elements for a vertical scrolling website? http://stackoverflow.com/questions/11051650/stellar-js-configuring-offsets-aligning-elements-for-a-vertical-scrolling-we if window.prettyPrint undefined prettyPrint handleEvents function var self this Debounce function from Underscore.js debounce function func wait var timeout return function var context this args arguments var later function timeout null func.apply.. window .unbind 'scroll.stellarsite' if scrollLeft 0 window .unbind 'scroll.stellarsite' .bind 'scroll.stellarsite' debounce handleScroll 500 else 'html body' .animate scrollLeft activeSection.offset .left 40 600 'easeInOutExpo' function setTimeout.. 40 600 'easeInOutExpo' function setTimeout function window .unbind 'scroll.stellarsite' .bind 'scroll.stellarsite' debounce handleScroll 500 10 window .bind 'mousewheel' function 'html body' .stop true true document .bind 'keydown' function..
window.scroll function freezes firefox http://stackoverflow.com/questions/12428754/window-scroll-function-freezes-firefox browsers trigger the scroll event hundred times you can consider using a library that have methods like throttle or debounce . http documentcloud.github.com underscore #throttle It's a very very bad idea to attach handlers to the window scroll event...
How to temporarily disable a click handler in jQuery? http://stackoverflow.com/questions/1263042/how-to-temporarily-disable-a-click-handler-in-jquery on the button fast several times it processes all those clicks before the div gets a chance to disappear. I want to debounce the button so that only the first click gets registered before the div disappears. javascript jquery share improve this..
Problems with Mobiscroll - orientationchange and access address bar crashes some mobile browsers http://stackoverflow.com/questions/13710834/problems-with-mobiscroll-orientationchange-and-access-address-bar-crashes-some sr debouncing function from John Hann http unscriptable.com index.php 2009 03 20 debouncing javascript methods var debounce function func threshold execAsap var timeout return function debounced var obj this args arguments function delayed if.. 2009 03 20 debouncing javascript methods var debounce function func threshold execAsap var timeout return function debounced var obj this args arguments function delayed if execAsap func.apply obj args timeout null if timeout clearTimeout.. setTimeout delayed threshold 100 smartresize jQuery.fn sr function fn threshold execAsap return fn this.bind 'resize' debounce fn threshold execAsap this.trigger sr jQuery 'smartresize' function createDatePicker 'date_1' window .smartresize function..
Facebook Style AJAX Search http://stackoverflow.com/questions/1568312/facebook-style-ajax-search you are referring to is called Debouncing I usually have a Debounce function at the bottom of all my scripts var debounce function func threshold execAsap var timeout return function debounced var obj this args arguments function delayed if.. function at the bottom of all my scripts var debounce function func threshold execAsap var timeout return function debounced var obj this args arguments function delayed if execAsap func.apply obj args timeout null if timeout clearTimeout timeout.. func.apply obj args timeout setTimeout delayed threshold 100 And then whenever I do anything that will benefit from a debounce I can use it generically So your code would be re written as #s .keyup debounce function var searchbox this .val var dataString..
What is the simplest jQuery way to have a 'position:fixed' (always at top) div? http://stackoverflow.com/questions/257250/what-is-the-simplest-jquery-way-to-have-a-positionfixed-always-at-top-div
URL Encode a string in jQuery for an AJAX request http://stackoverflow.com/questions/6544564/url-encode-a-string-in-jquery-for-an-ajax-request
window.resize in jquery firing multiple times http://stackoverflow.com/questions/6658517/window-resize-in-jquery-firing-multiple-times sr debouncing function from John Hann http unscriptable.com index.php 2009 03 20 debouncing javascript methods var debounce function func threshold execAsap var timeout return function debounced var obj this args arguments function delayed if.. 2009 03 20 debouncing javascript methods var debounce function func threshold execAsap var timeout return function debounced var obj this args arguments function delayed if execAsap func.apply obj args timeout null if timeout clearTimeout.. obj args timeout setTimeout delayed threshold 100 smartresize jQuery.fn sr function fn return fn this.bind 'resize' debounce fn this.trigger sr jQuery 'smartresize' usage window .smartresize function code that takes it easy... share improve this..
Ways to throttle ajax requests http://stackoverflow.com/questions/6967785/ways-to-throttle-ajax-requests
|