javascript - Why ‘orientationchange’ event is not firing on browser resize? -
i using below javascript code. it’s not working on browser resize. , used foundation (zurb) framework in project.
<script type="text/javascript"> $(window).on("orientationchange", function () { alert("the orientation has changed!"); // want other stuff here depend on landscap or portrait }); </script>
please let me know missed here. thanks
orientation change
portrait / landscape change
resize
different event
you can load
required event in similar cases load
fired when page loads first can initial adjustments.
$(window).on("orientationchange load resize", function () { alert("the orientation has changed!"); // want other stuff here depend on landscap or portrait });
Comments
Post a Comment