Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Функция
- jQuery.windowHeight = function (){
- var _window = $(window),
- resize = function(e){
- $(".windowHeight").each(function(index, item){
- $(item).height(_window.height());
- });
- };
- (function(){
- var time;
- window.onresize = function(e){
- if (time) clearTimeout(time);
- time = setTimeout(function(){
- resize(e);
- }, 500);
- }
- })();
- _window.trigger('resize');
- };
- // Её вызов
- $.windowHeight();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement