|
1 | 1 | var owl = $('.owl-carousel'); |
| 2 | +$(function () { |
| 3 | + $('a[href*=\\#]:not([href=\\#])').on('click', function () { |
| 4 | + var target = $(this.hash); |
| 5 | + target = target.length ? target : $('[name=' + this.hash.substr(1) + ']'); |
| 6 | + if (target.length) { |
| 7 | + $('html,body').animate({ |
| 8 | + scrollTop: target.offset().top |
| 9 | + }, 1000); |
| 10 | + return false; |
| 11 | + } |
| 12 | + }); |
| 13 | +}); |
2 | 14 | owl.owlCarousel({ |
3 | 15 | items: 1, |
4 | 16 | loop: true, |
@@ -51,22 +63,22 @@ owl.owlCarousel({ |
51 | 63 | } |
52 | 64 | }); |
53 | 65 | new WOW().init(); |
54 | | -$(document).ready(function() { |
| 66 | +$(document).ready(function () { |
55 | 67 | $(".se-pre-con").fadeOut("slow"); |
56 | | - $('.toggle').click(function() { |
| 68 | + $('.toggle').click(function () { |
57 | 69 | $('nav').toggleClass('active'); |
58 | 70 | }); |
59 | | - $(window).scroll(function() { // check if scroll event happened |
| 71 | + $(window).scroll(function () { // check if scroll event happened |
60 | 72 | if ($(document).scrollTop() > 50) { // check if user scrolled more than 50 from top of the browser window |
61 | 73 | $(".navbars").css("background-color", "#25499F"); // if yes, then change the color of class "navbar-fixed-top" to white (#f8f8f8) |
62 | 74 | } else { |
63 | 75 | $(".navbars").css("background-color", "transparent"); // if not, change it back to transparent |
64 | 76 | } |
65 | 77 | }); |
66 | | - $('.toggle').click(function() { |
| 78 | + $('.toggle').click(function () { |
67 | 79 | $('nav').toggleClass('menu') |
68 | 80 | }); |
69 | | - $('.navopt').click(function() { |
| 81 | + $('.navopt').click(function () { |
70 | 82 | $('nav').toggleClass('menu') |
71 | 83 | }); |
72 | 84 | }); |
|
0 commit comments