Skip to content

Instantly share code, notes, and snippets.

@vitasya
vitasya / common.js
Last active December 6, 2016 18:03
autoadjust height
$(document).ready(function(){
function heightDetect(){
$('.main_head').css('min-height', $(window).height());
};
heightDetect();
$(window).on('resize', heightDetect);
});
@vitasya
vitasya / myPlugin.js
Created December 26, 2016 15:09
new empty jQuery plugin file
(function($){
$.fn.customAnimate = function(direction){
return this.each(function(){
var ths = $(this);
});
};
})(jQuery);
@vitasya
vitasya / no-cache.html
Last active June 5, 2017 12:18
tell browser not to cache html page
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />