|
Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/rabbithabit.com/public_html/themes/3/js/ |
Upload File : |
jQuery.noConflict();
jQuery(document).ready(function($){
jQuery('.toggle_menu span').click(function(){
if (jQuery('.toggle_menu span').hasClass('fa-bars')) {
jQuery('.toggle_menu span').removeClass( "fa-bars") ;
}
else {
jQuery('.toggle_menu span').addClass( "fa-bars") ;
}
jQuery('.res_nav').slideToggle();
});
// Product Img Gallery
$(function(){
//SyntaxHighlighter.all();
});
jQuery(document).ready(function(){
jQuery('#carousel').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 80,
itemMargin: 2,
asNavFor: '#slider'
});
jQuery('#slider').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
sync: "#carousel",
start: function(slider){
jQuery('body').removeClass('loading');
}
});
});
//jQuery('.carousel').carousel()
jQuery('.close_search').click(function(){
jQuery('.search_box').slideUp();
});
// Accordion
jQuery('#res_navi').find('.accordion_toggle_nv').click(function(){
//Expand or collapse this panel
jQuery(this).toggleClass('open');
jQuery(this).next().slideToggle('fast');
//Hide the other panels
jQuery("ul.res_navi_sub").not(jQuery(this).next()).slideUp('fast');
});
//Sub Menu
jQuery('.main_nav ul li.have_sub').hover( function () {
jQuery('.nav_masking').show(); },
function () {
jQuery('.nav_masking').hide();
}
);
jQuery(".top_right_menu ul li.src span").click(function(){
//jQuery(".top_search").toggle();
jQuery('.search_box').slideDown();
});
jQuery(".top_right_menu_res ul li.src span").click(function(){
//jQuery(".top_search").toggle();
jQuery('.search_box').slideDown();
});
jQuery('#accordion').find('.accordion-toggle').click(function(){
//Expand or collapse this panel
jQuery(this).next().slideToggle('fast');
//changes arrow
if( jQuery(this).find('.arrow').hasClass('arrowUp')){
jQuery(this).find('.arrow').removeClass('arrowUp').addClass('arrowDown');
} else {
jQuery('#accordion').find('.arrow').removeClass('arrowUp').addClass('arrowDown');
jQuery(this).find('.arrow').removeClass('arrowDown').addClass('arrowUp');
}
//Hide the other panels
jQuery(".accordion-content").not(jQuery(this).next()).slideUp('fast');
});
jQuery('.top_alertbtn').click(function(){
jQuery('.top_alert').slideUp() ;
});
// Select all links with hashes
jQuery('.arrow_down a[href*="#"]')
// Remove links that don't actually link to anything
.not('[href="#"]')
.not('[href="#0"]')
.click(function(event) {
// On-page links
if (
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
&&
location.hostname == this.hostname
) {
// Figure out element to scroll to
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
// Does a scroll target exist?
if (target.length) {
// Only prevent default if animation is actually gonna happen
event.preventDefault();
$('html, body').animate({ scrollTop: target.offset().top-90
}, 500, function() {
// Callback after animation
// Must change focus!
var $target = $(target);
$target.focus();
if ($target.is(":focus")) { // Checking if the target was focused
return false;
} else {
$target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
$target.focus(); // Set focus again
};
});
}
}
});
// Select all links with hashes
jQuery('.product_detail_nv ul li.apx1 a[href*="#"]')
// Remove links that don't actually link to anything
.not('[href="#"]')
.not('[href="#0"]')
.click(function(event) {
// On-page links
if (
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
&&
location.hostname == this.hostname
) {
// Figure out element to scroll to
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
// Does a scroll target exist?
if (target.length) {
// Only prevent default if animation is actually gonna happen
event.preventDefault();
$('html, body').animate({ scrollTop: target.offset().top-110
}, 500, function() {
// Callback after animation
// Must change focus!
var $target = $(target);
$target.focus();
if ($target.is(":focus")) { // Checking if the target was focused
return false;
} else {
$target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
$target.focus(); // Set focus again
};
});
}
}
});
// Select all links with hashes
jQuery('.product_detail_nv ul li.apx0 a[href*="#"]')
// Remove links that don't actually link to anything
.not('[href="#"]')
.not('[href="#0"]')
.click(function(event) {
// On-page links
if (
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
&&
location.hostname == this.hostname
) {
// Figure out element to scroll to
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
// Does a scroll target exist?
if (target.length) {
// Only prevent default if animation is actually gonna happen
event.preventDefault();
$('html, body').animate({ scrollTop: target.offset().top-90
}, 500, function() {
// Callback after animation
// Must change focus!
var $target = $(target);
$target.focus();
if ($target.is(":focus")) { // Checking if the target was focused
return false;
} else {
$target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
$target.focus(); // Set focus again
};
});
}
}
});
});
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop() > 500){
jQuery('.header_fx').addClass("fix_header animated fadeInDown");
//jQuery('.bottom_left_menu').addClass("lt_scroll animateds fadeIn");
}
else{
jQuery('.header_fx').removeClass("fix_header animated fadeInDown");
//jQuery('.bottom_left_menu').removeClass("lt_scroll animateds fadeIn");
}
});
jQuery(window).scroll(function () {
if (jQuery(this).scrollTop() > 10) {
jQuery('.product_detail_nv_box').addClass('product_detail_nv_box_fix');
jQuery('.product_detail_nv_box').addClass('animated fadeInDown');
//jQuery('.product_browse_sub_in .product_browse_sub').addClass('product_browse_sub_fix animated fadeInDown');
//jQuery('.product_browse_sub_in .product_browse_sub .product_browse_sub_in').addClass('wrapp2');
} else {
jQuery('.product_detail_nv_box').removeClass('product_detail_nv_box_fix');
jQuery('.product_detail_nv_box').removeClass('animated fadeInDown');
//jQuery('.product_browse_sub_in .product_browse_sub').removeClass('product_browse_sub_fix animated fadeInDown');
//jQuery('.product_browse_sub_in .product_browse_sub .product_browse_sub_in').removeClass('wrapp2');
}
});
// Hide Search Box on scroll top
jQuery(window).scroll(function () {
if (jQuery(this).scrollTop() > 190) {
jQuery('.search_box').hide();
}
});
jQuery(window).scroll(function () {
if (jQuery(this).scrollTop() > 50) {
jQuery('.total_box_fix').show();
jQuery('.total_box_fix').addClass('animated fadeInDown');
}
else {
jQuery('.total_box_fix').hide();
jQuery('.total_box_fix').removeClass('animated fadeInDown');
}
});
function callAjax(loc,data_p = {id:''},callback = function(r_jx){}){
jQuery.ajax({
url : '<?= base_url(); ?>' + loc,
type : 'POST',
dataType : "json",
data : data_p,
success : function(jx) {
callback(jx);
},
error : function(jx) {
},
});
}