Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. // Change place of divs in dom based on width of device ================================
  2. $(window).resize(function(){
  3. resize();
  4. });
  5.  
  6. $(document).ready(function(){
  7. resize();
  8. });
  9.  
  10. function resize(){
  11. if($(window).width() < 767)
  12. {
  13. //Mobile
  14. $(".sidebar").insertAfter(".section.product_section");
  15. }
  16. else
  17. {
  18. //Desktop
  19. //Leave original layout
  20. $(".sidebar").insertBefore(".content .twelve.columns");
  21. }
  22. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement