Guest User

main.js

a guest
Nov 28th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. ---
  2. layout: null
  3. ---
  4. $(document).ready(function () {
  5. $('a.blog-button').click(function (e) {
  6. $('.content-wrapper__inner').css('display', 'block')
  7. if ($('.panel-cover').hasClass('panel-cover--collapsed')) return
  8. currentWidth = $('.panel-cover').width()
  9. if (currentWidth < 960) {
  10. $('.panel-cover').addClass('panel-cover--collapsed')
  11. $('.content-wrapper').addClass('animated slideInRight')
  12. } else {
  13. $('.panel-cover').css('max-width', currentWidth)
  14. $('.panel-cover').animate({'max-width': '530px', 'width': '40%'}, 400, swing = 'swing', function () {})
  15. }
  16. })
  17.  
  18. if (window.location.hash && window.location.hash == '#blog') {
  19. $('.panel-cover').addClass('panel-cover--collapsed')
  20. $('.content-wrapper__inner').css('display', 'block')
  21. }
  22.  
  23. if (window.location.pathname !== '{{ site.baseurl }}' && window.location.pathname !== '{{ site.baseurl }}index.html') {
  24. $('.panel-cover').addClass('panel-cover--collapsed')
  25. $('.content-wrapper__inner').css('display', 'block')
  26. }
  27.  
  28. $('.btn-mobile-menu').click(function () {
  29. $('.navigation-wrapper').toggleClass('visible animated bounceInDown')
  30. $('.btn-mobile-menu__icon').toggleClass('icon-list icon-x-circle animated fadeIn')
  31. })
  32.  
  33. $('.navigation-wrapper .blog-button').click(function () {
  34. $('.navigation-wrapper').toggleClass('visible')
  35. $('.btn-mobile-menu__icon').toggleClass('icon-list icon-x-circle animated fadeIn')
  36. })
  37.  
  38. })
Add Comment
Please, Sign In to add comment