Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. var jq = jQuery;
  2.  
  3. //Page resize hide & show
  4. jq(window).resize(function() {
  5. var width = jq(window).width();
  6. newWidth = jq(window).width();
  7. if ( newWidth >= 980 ) {
  8. // Do something
  9. } else {
  10. // Do something
  11. };
  12. });
  13.  
  14. jq(window).load(function(){
  15. widthHorz = jq(window).width();
  16. });
  17.  
  18. //Page resize hide & show
  19. jq(window).resize(function() {
  20. if ( widthHorz != jq(window).width() ) {
  21. var newWidth = jq(window).width();
  22. if ( newWidth >= 980 ) {
  23. // Do something
  24. } else {
  25. // Do something
  26. };
  27. };
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement