Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function(){
- var $window = $(window);
- function checkWidth() {
- var windowsize = $window.width();
- if (windowsize < 768) {
- //do work for < 768
- }
- else{
- //do work for other size greater then 768
- }
- }
- //initialize for first time check
- checkWidth();
- //now check on window resize
- $(window).resize(checkWidth);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement