响应式设计测试书签
由 Benjamin Keen 创建的书签,它自动化了 Lennart Schoors 的想法,该想法将当前页面加载到一堆不同大小的 iframe 中,因此当在大型显示器上工作时,您可以看到设计在…
重定向到 SSL
window.location = "https://" + window.location.hostname + window.location.pathname + window.location.search;
您可能想测试一下 window.location.href 是否不以“https”开头,然后再执行此操作,因此您只有在必须时才重定向。…
粘贴事件
$.fn.pasteEvents = function( delay ) {
if (delay == undefined) delay = 20;
return $(this).each(function() {
var $el = $(this);
$el.on("paste", function() {
$el.trigger("prepaste");
setTimeout(function() { $el.trigger("postpaste"); }, delay);
});
});
};
在元素上调用此插件,然后您…