Last active
August 29, 2015 14:12
-
-
Save sanketss84/b8da60a92da0e6f8b150 to your computer and use it in GitHub Desktop.
JS : Show Window Resolution in DIV using jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HTML | |
| <section> | |
| <div id="pageresol"></div> | |
| </section> | |
| //Window Resize | |
| var wh = ""; | |
| wh = $(window).width() + ' x ' + $(window).height(); | |
| $('#pageresol').text(wh); | |
| $(window).resize(function(){ | |
| wh = $(window).width() + ' x ' + $(window).height(); | |
| $('#pageresol').text(wh); | |
| // $('#pageresol').fadeIn('slow'); | |
| // $('#pageresol').fadeOut('slow'); | |
| // console.log(wh); | |
| }); | |
| //Window Resize | |
| CSS | |
| #pageresol | |
| { | |
| text-align:left; | |
| font-family : 'Roboto', sans-serif; | |
| font-size:12px; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment