File: /home/barbeatleanalyti/public_html/public_html/application/views/front/include/js.php
<!---slider-js--->
<script>
$(document).ready(function(){
// Add smooth scrolling to all links
$("a").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 800, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
});
</script>
<!--//-slider---->
<!-----heder navigation fixed--->
<script>
$(document).ready(function(){
$(window).bind('scroll', function() {
var navHeight = $( window ).height() - 300;
if ($(window).scrollTop() > navHeight) {
$('nav').addClass('fixed');
}
else {
$('nav').removeClass('fixed');
}
});
});
</script>
<!---//--heder navigation fixed--->
<!-----navigation active class--
<script>
$(document).ready(function(){
$('ul.nav.navbar-nav li').click(function(){
$('ul.nav.navbar-nav li').removeClass("active");
$(this).addClass("active");
});
});
</script>--->
<!---//--navigation active class-->
<!------------slider---------->
<script src="<?php echo base_url()?>assets-front/js/jquery-2.2.0.min.js" type="text/javascript"></script>
<script src="<?php echo base_url()?>assets-front/js/slick.js" type="text/javascript" charset="utf-8"></script>
<script>
$('.Supported-slider').slick({
slidesToShow: 3,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 800,
});
</script>
<!--------// slider------------------>
<script>
var sections = $('section')
, nav = $('nav')
, nav_height = nav.outerHeight();
$(window).on('scroll', function () {
var cur_pos = $(this).scrollTop();
sections.each(function() {
var top = $(this).offset().top - nav_height,
bottom = top + $(this).outerHeight();
if (cur_pos >= top && cur_pos <= bottom) {
nav.find('a').removeClass('active');
sections.removeClass('active');
$(this).addClass('active');
nav.find('a[href="#'+$(this).attr('id')+'"]').addClass('active');
}
});
});
nav.find('a').on('click', function () {
var $el = $(this)
, id = $el.attr('href');
$('html, body').animate({
scrollTop: $(id).offset().top - nav_height
}, 500);
return false;
});
</script>
<style>
</style>
<style>
.wow:first-child {
visibility: hidden;
}
</style>
<script src="<?php echo base_url()?>assets-front/js/wow.js"></script>
<script>
wow = new WOW(
{
animateClass: 'animated',
offset: 100,
callback: function(box) {
console.log("WOW: animating <" + box.tagName.toLowerCase() + ">")
}
}
);
wow.init();
document.getElementById('moar').onclick = function() {
var section = document.createElement('section');
section.className = 'section--purple wow fadeInDown';
this.parentNode.insertBefore(section, this);
};
</script>