Advertisement
Guest User

a

a guest
Jun 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. function openNav() {
  2. document.getElementById("mySidenav").style.width = "250px";
  3. }
  4.  
  5. function closeNav() {
  6. document.getElementById("mySidenav").style.width = "0";
  7. }
  8.  
  9.  
  10.  
  11. (function($) {
  12.  
  13. // Menu filer
  14. $("#menu-flters li a").click(function() {
  15. $("#menu-flters li a").removeClass('active');
  16. $(this).addClass('active');
  17.  
  18. var selectedFilter = $(this).data("filter");
  19. // $("#menu-wrapper").fadeTo(100, 0);
  20.  
  21. $(".menu-restaurant").fadeOut();
  22.  
  23. setTimeout(function() {
  24. $(selectedFilter).slideDown();
  25. //$("#menu-wrapper").fadeTo(300, 1);
  26. }, 300);
  27. });
  28.  
  29. // Add smooth scrolling to all links in navbar + footer link
  30. $(".sidenav a").on('click', function(event) {
  31. var hash = this.hash;
  32. if (hash) {
  33. event.preventDefault();
  34. $('html, body').animate({
  35. scrollTop: $(hash).offset().top
  36. }, 900, function() {
  37. window.location.hash = hash;
  38. });
  39. }
  40.  
  41. });
  42.  
  43. $(".sidenav a").on('click', function() {
  44. closeNav();
  45. });
  46.  
  47. })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement