Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. if(window.innerWidth < 767){
  2. if(window.innerWidth < 480){
  3. if(box.style.left === '-9999px'){
  4. box.style.left='0px';
  5. box.style.top='45px';
  6. box.style.width='280px';
  7. btn.style.right='-44px';
  8. btn.style.top='5px';
  9. btn.style.transform='rotate(180deg)';
  10. if(btn.style.right === '-9639px'){
  11. btnId.add("rotateBtn");
  12. }
  13. }else{
  14. box.style.left='-9999px';
  15. btn.style.top='15px';
  16. btnId.remove("rotateBtn");
  17. btn.style.right='-9759px';
  18. btn.style.transform='rotate(0deg)';
  19. }
  20. }
  21. if(box.style.left === '-9999px'){
  22. box.style.left='-20px';
  23. btn.style.right='-44px';
  24. btn.style.transform='rotate(180deg)';
  25. if(btn.style.right === '-9639px'){
  26. btnId.add("rotateBtn");
  27. }
  28. }else{
  29. box.style.left='-9999px';
  30. btnId.remove("rotateBtn");
  31. btn.style.right='-9639px';
  32. btn.style.transform='rotate(0deg)';
  33. }
  34. }
  35. else{
  36. if(box.style.left === '-9999px'){
  37. box.style.left='0px';
  38. box.style.top='45px';
  39. btn.style.right='-44px';
  40. btn.style.top='5px';
  41. btn.style.transform='rotate(180deg)';
  42. if(btn.style.right === '-9639px'){
  43. btnId.add("rotateBtn");
  44. }
  45. }else{
  46. box.style.left='-9999px';
  47. btn.style.top='15px';
  48. btnId.remove("rotateBtn");
  49. btn.style.right='-9639px';
  50. btn.style.transform='rotate(0deg)';
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement