/ Published in: jQuery
Not mine. Don't remember source.
Expand |
Embed | Plain Text
$(document).bind('keydown keyup', function(ev) { var ctrlkey = false; ctrlkey = ev.ctrlKey; if(ev.type == 'keyup' && ctrlkey) { if(ev.keyCode == 82) { reloadStylesheets(); } } }); function reloadStylesheets() { var stylesheets = $('link[rel="stylesheet"]'); var reloadQueryString = '?reload=' + new Date().getTime(); stylesheets.each(function () { this.href = this.href.replace(/\?.*|$/, reloadQueryString); }); }
You need to login to post a comment.
