Skip to content

Instantly share code, notes, and snippets.

@JDMcKinstry
Created June 15, 2016 15:29
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 JDMcKinstry/3bebae10335e2626ee9987516b5765a0 to your computer and use it in GitHub Desktop.
Save JDMcKinstry/3bebae10335e2626ee9987516b5765a0 to your computer and use it in GitHub Desktop.
var cjsSelector = '';
;(function() {
var iDoIt = 1;
function doIt() {
/* ↓↓↓ DO WORK IN HERE ↓↓↓ */
jQuery(cjsSelector).remove();
/* ↑↑↑ DO WORK IN HERE ↑↑↑ */
iDoIt = iDoIt < 10 ? iDoIt + 1 : 1;
setTimeout(doIt, iDoIt * 1000);
}
if (document.readyState == 'complete') doIt();
else window.onload = doIt;
})();
if (jQuery) jQuery(cjsSelector).remove();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment