javascript - Jquery script is acting weird on desktop -


i'm using jquery script below make sure first div's height of page equal viewport of user's screen.:

<script type="text/javascript">     $(window).resize(function() {       $(".introduction").css("height", window.innerheight+"px");     }); </script> </body> 

where .introduction class of first div. work on tablet, acting wierd when seen on big desktop screen. works if right-click => inspect page , close up.

any ideas ?

here page i'm working on @ moment:

http://shotokanlaprairie.com/notre-dojo/

thank !

you might want put script inside document.ready , trigger event such fire @ launch

$(window).resize(function() {   /* logic */ }).trigger("resize"); 

Comments