Skip to content

Instantly share code, notes, and snippets.

@s2ar
Created December 13, 2016 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s2ar/007efa69d5b7cb46f5b2077bdf70ed29 to your computer and use it in GitHub Desktop.
Save s2ar/007efa69d5b7cb46f5b2077bdf70ed29 to your computer and use it in GitHub Desktop.
setInterval.js
var btn = $('#set_filter_price');
var myVar = setInterval(function(){
checkBtnFilter();
}, 50);
function checkBtnFilter() {
if(!btn.prop('disabled')){
btn.click();
//console.log(btn)
stopcheckBtnFilter();
}
}
function stopcheckBtnFilter() {
clearInterval(myVar);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment