File: /home/ohirex/web/ohirex.com/public_html/wp-content/themes/revenueplus/assets/js/jquery.custom.js
(function($){ //create closure so we can safely use $ as alias for jQuery
$(document).ready(function(){
"use strict";
/*-----------------------------------------------------------------------------------*/
/* Superfish Menu
/*-----------------------------------------------------------------------------------*/
// initialise plugin
var example = $('.sf-menu').superfish({
//add options here if required
delay: 100,
speed: 'fast',
autoArrows: false
});
/*-----------------------------------------------------------------------------------*/
/* Sticky Header
/*-----------------------------------------------------------------------------------*/
$(window).scroll(function () {
if ($(this).scrollTop() > 75) {
$('.site-header').addClass("sticky-nav");
$('.site-content').addClass('has-sticky');
} else {
$('.site-header').removeClass("sticky-nav");
$('.site-content').removeClass('has-sticky');
}
});
/*-----------------------------------------------------------------------------------*/
/* bxSlider
/*-----------------------------------------------------------------------------------*/
$('.bxslider').show().bxSlider({
auto: true,
preloadImages: 'all',
pause: '6000',
autoHover: true,
adaptiveHeight: true,
mode: 'fade',
touchEnabled: false,
onSliderLoad: function(){
$(".bxslider").css("display", "block");
$(".bxslider").css("visibility", "visible");
$('#featured-content .featured-slide .entry-header').fadeIn("100");
$('#featured-content .featured-slide .gradient').fadeIn("100");
}
});
/*-----------------------------------------------------------------------------------*/
/* Back to Top
/*-----------------------------------------------------------------------------------*/
// hide #back-top first
$("#back-top").hide();
$(function () {
// fade in #back-top
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('#back-top').fadeIn('200');
} else {
$('#back-top').fadeOut('200');
}
});
// scroll body to 0px on click
$('#back-top a').click(function () {
$('body,html').animate({
scrollTop: 0
}, 400);
return false;
});
});
});
})(jQuery);