Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).width();
- $(document).width();
- $(window).height();
- $(document).height();
- $(function(){
- $(window).resize(function(){
- var h = $(window).height();
- var w = $(window).width();
- $("#elementToResize").css('height',(h < 1024 || w < 768) ? 500 : 400);
- });
- });
- jQuery.event.add(window, "load", resizeFrame);
- jQuery.event.add(window, "resize", resizeFrame);
- function resizeFrame()
- {
- var h = $(window).height();
- var w = $(window).width();
- $("#elementToResize").css('height',(h < 1024 || w < 768) ? 500 : 400);
- }
Add Comment
Please, Sign In to add comment