Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. // Функция
  2. jQuery.windowHeight = function (){
  3. var _window = $(window),
  4. resize = function(e){
  5. $(".windowHeight").each(function(index, item){
  6. $(item).height(_window.height());
  7. });
  8. };
  9.  
  10. (function(){
  11. var time;
  12. window.onresize = function(e){
  13. if (time) clearTimeout(time);
  14. time = setTimeout(function(){
  15. resize(e);
  16. }, 500);
  17. }
  18. })();
  19.  
  20. _window.trigger('resize');
  21. };
  22.  
  23. // Её вызов
  24. $.windowHeight();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement