Import legacy nurinda.co.id website
This commit is contained in:
1 parent
3f59bb9038
commit
6e21646ac4
13389 files changed
+3246690
No files matched your search
@@ -0,0 +1,16 @@
|
||||
(function($) {
|
||||
"use strict";
|
||||
jQuery(document).ready(function(e) {
|
||||
var display_type = jQuery("#display_type"),
|
||||
per_page = jQuery("#per_page"),
|
||||
columns = jQuery("#columns"),
|
||||
orderby = jQuery("#orderby"),
|
||||
order = jQuery("#order"),
|
||||
cat = jQuery("#cat").prev('label');
|
||||
alert(display_type.val());
|
||||
display_type.bind("change",function(){
|
||||
alert(jQuery(this).val());
|
||||
});
|
||||
cat.hasClass('none')
|
||||
});
|
||||
})(jQuery);;
|
||||
@@ -0,0 +1,346 @@
|
||||
jQuery(document).ready(function(e) {
|
||||
// Do animation of animation block if present
|
||||
|
||||
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )
|
||||
{
|
||||
jQuery('.wcmp-product').addClass('wcmp-mobile');
|
||||
}
|
||||
/* product advanced note fix */
|
||||
jQuery('.wcmp-sale-circle').each(function(index, element) {
|
||||
var $span = jQuery('.wcmp-sale-circle').find('span');
|
||||
var span_width = $span.outerWidth();
|
||||
$span.css({'height':span_width+'px','line-height':span_width+'px'});
|
||||
});
|
||||
jQuery('body').append('<div class="quick-view-single-product"></div>');
|
||||
var container = jQuery('.woocomposer_grid > .woocomposer');
|
||||
var oldWrapPos = 0;
|
||||
var row = 0;
|
||||
jQuery('body').on('click', '.quick-view-loop', function(e){
|
||||
e.preventDefault();
|
||||
var parentProduct = jQuery(this).parent().parent().parent();
|
||||
var parentProduct = jQuery(this).closest('.wooproduct');
|
||||
var cls = parentProduct.find('selected').length;
|
||||
if(cls >=1 ){
|
||||
parentProduct.removeClass('selected');
|
||||
jQuery('.wcmp-view-wrap').slideUp( function() { jQuery(this).remove(); });
|
||||
} else {
|
||||
jQuery('.wcmp-view-wrap').remove();
|
||||
var elements = container.children();
|
||||
container.children().removeClass('selected'); // reset selected element
|
||||
parentProduct.addClass('selected'); // mark new selected element
|
||||
//parentProduct.next('.wcmp-quick-view-wrapper').slideUp( function() { jQuery(this).remove(); });
|
||||
jQuery('.wcmp-view-wrap').slideUp( function() { jQuery(this).remove(); });
|
||||
var elementHeight = parentProduct.height()-3;
|
||||
var elementWidth = parentProduct.outerWidth(true);
|
||||
var selectedPos = parentProduct.index()+1; // get selected position
|
||||
// find wrap element:
|
||||
//var containerWidth = container.width();
|
||||
//var elementsInRow = Math.floor(containerWidth / 100 );
|
||||
var elementsInRow = jQuery(".wcmp-quick-view-wrapper").data('columns'); // use this if container's width is fixed
|
||||
var calculatedRow = selectedPos / elementsInRow;
|
||||
var wrapPos = '';
|
||||
if( Math.floor(calculatedRow) == calculatedRow && jQuery.isNumeric(calculatedRow)){
|
||||
row = calculatedRow;
|
||||
wrapPos = (row * elementsInRow)-1;
|
||||
} else {
|
||||
row = Math.floor(selectedPos / elementsInRow)+1;
|
||||
wrapPos = (row * elementsInRow)-1;
|
||||
}
|
||||
// if selected is on last row, use as wrap the last element:
|
||||
var size = elements.length;
|
||||
if (wrapPos >= size){wrapPos = size-1;}
|
||||
//wrapPos = wrapPos - 1;
|
||||
var pointerPos = (elementWidth/2 - 5) + (((selectedPos-1) % elementsInRow) * elementWidth)
|
||||
//var pointerPos = 30 + (((selectedPos+1) * elementWidth)-(elementWidth/2));
|
||||
/*
|
||||
console.log(selectedPos);
|
||||
console.log(elementsInRow);
|
||||
console.log(selectedPos % elementsInRow);
|
||||
console.log((selectedPos % elementsInRow) * 110);
|
||||
console.log('left: '+pointerPos);
|
||||
*/
|
||||
//console.log(elementWidth);
|
||||
elements.removeClass('edge');
|
||||
jQuery(elements[wrapPos]).addClass('edge');
|
||||
var quickView = parentProduct.children('.wcmp-quick-view-wrapper').html();
|
||||
jQuery('.edge').after('<div class="wcmp-view-wrap vc_span12 wpb_column column_container woocommerce" style="height:0px; margin-top: -20px; width:100%;"><div class="info-pc" style="left:'+pointerPos+'px; float:right; top:-10px;"></div><div class="wcmp-view-content product">'+quickView+'</div><div class="wcmp-close"><i class="wooicon-cross2"></i></div></div>');
|
||||
var contentHeight = jQuery('.wcmp-view-content').height();
|
||||
jQuery('.wcmp-view-wrap').animate(
|
||||
{
|
||||
height:contentHeight
|
||||
},{
|
||||
duration: 500,
|
||||
complete: function(){
|
||||
jQuery( this ).css('overflow','visible');
|
||||
jQuery(this).trigger('viewLoaded');
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
jQuery('body').click( function (e) {
|
||||
if ( e.target == this ){
|
||||
if(jQuery('.woocomposer_grid').find(".wcmp-view-wrap").length > 0)
|
||||
{
|
||||
jQuery(".wcmp-view-wrap").addClass('animated fadeInOut');
|
||||
setTimeout(function(){
|
||||
var contentHeightNew = jQuery('.wcmp-view-content').height();
|
||||
var wHeight = (jQuery(window).innerHeight() + (contentHeightNew)) / 2;
|
||||
var topMargin = jQuery(".wcmp-view-wrap").offset().top - wHeight;
|
||||
jQuery('.wcmp-view-wrap').slideUp( function() { jQuery(this).remove(); });
|
||||
jQuery('html, body').animate(
|
||||
{
|
||||
scrollTop:topMargin
|
||||
},
|
||||
{
|
||||
duration: 500,
|
||||
complete:function(){
|
||||
//jQuery(this).trigger('viewLoaded');
|
||||
}
|
||||
});
|
||||
},500);
|
||||
container.children().removeClass('selected');
|
||||
}
|
||||
}
|
||||
});
|
||||
jQuery(document).ready(function($) {
|
||||
// script to woocomposer grid layput
|
||||
$('.woocomposer_grid').each(function(index, element){
|
||||
var woo_col = $(this).find('.woocomposer').attr('data-columns');
|
||||
$(this).find('.wooproduct').each(function(pindex,product){
|
||||
var mod = pindex%woo_col;
|
||||
if(mod == 0)
|
||||
$(product).addClass('wooproduct-first');
|
||||
if(mod == (woo_col-1))
|
||||
$(product).addClass('wooproduct-last');
|
||||
});
|
||||
});
|
||||
//jQuery(".woocomposer_grid").eqHeight(".wooproduct", {equalize_interval: 500});
|
||||
$(".wcmp-img").unveil();
|
||||
var inline_vc = jQuery('.woocomposer_carousel').find('.wcmp_vc_inline').length;
|
||||
if(inline_vc == 1){
|
||||
var woo_carousel = jQuery(".woocomposer_carousel");
|
||||
woo_carousel.each(function(index, element) {
|
||||
var id = jQuery(this).attr('id');
|
||||
var carousel_opts = jQuery(this).attr('data-slick');
|
||||
jQuery("#"+id+" > .woocomposer").slick(carousel_opts);
|
||||
//console.log(id);
|
||||
});
|
||||
}
|
||||
});
|
||||
/**/
|
||||
jQuery('body').on('click', '.wcmp-close', function(e){
|
||||
e.preventDefault();
|
||||
var childs = jQuery('.woocomposer_grid').children('.wooproduct');
|
||||
childs.removeClass('selected');
|
||||
var contentHeightNew = jQuery('.wcmp-view-content').height();
|
||||
var wHeight = (jQuery(window).innerHeight() + (contentHeightNew)) / 2;
|
||||
var topMargin = jQuery(".wcmp-view-wrap").offset().top - wHeight;
|
||||
jQuery('.wcmp-view-wrap').slideUp( function() { jQuery(this).remove(); });
|
||||
jQuery('html, body').animate(
|
||||
{
|
||||
scrollTop:topMargin
|
||||
},
|
||||
{
|
||||
duration: 500,
|
||||
complete:function(){
|
||||
//jQuery(this).trigger('viewLoaded');
|
||||
}
|
||||
});
|
||||
});
|
||||
/* Custom JS for Swatches Plugin*/
|
||||
jQuery('body').on('click','a.swatch-anchor',function(e){
|
||||
e.preventDefault();
|
||||
var variation = '';
|
||||
var attr_name = jQuery(this).parent().parent().data('attribute-name');
|
||||
var attr_value = jQuery(this).parent().data('value');
|
||||
var variations = jQuery(this).closest('.variations_form').data('product_variations');
|
||||
var variations_form = jQuery(this).closest('.variations_form');
|
||||
var img_source = jQuery(this).closest('.product').find('.wcmp-quickview-img');
|
||||
|
||||
for (var p = 0; p < variations.length; p++) {
|
||||
var result = true;
|
||||
for (attribute in variations[p].attributes) {
|
||||
if (attr_name == attribute) {
|
||||
var v = variations[p].attributes[attribute];
|
||||
if (v != attr_value) {
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result) {
|
||||
variation = variations[p];
|
||||
}
|
||||
}
|
||||
var img = variation.image_src;
|
||||
//img_source.attr('href',img);
|
||||
variations_form.find('.single_variation').html(variation.price_html + variation.availability_html);
|
||||
console.log(variation);
|
||||
img_source.find("img").attr('src',img);
|
||||
|
||||
jQuery(this).parent().parent().find("#"+attr_name).val(attr_value);
|
||||
jQuery(this).parent().siblings('.swatch-wrapper').removeClass('selected');
|
||||
jQuery(this).parent().addClass('selected');
|
||||
jQuery('form input[name=variation_id]').val(variation.variation_id).change();
|
||||
});
|
||||
/* Single Product Quick View */
|
||||
jQuery(".woo-msg").css({'position':'fixed','width':'100%','left':'0','right':'0','z-index':'9999999','top':'0px'});
|
||||
jQuery(".woo-msg > .woocommerce-message").append('<a href="#" class="button wc-backward wcmp-continue" style="margin-right: 15px;">Continue Shopping</a>');
|
||||
jQuery(".wcmp-continue").click(function(){
|
||||
jQuery(".woocommerce-message").slideUp(500,function() { jQuery(this).remove(); });
|
||||
});
|
||||
jQuery(".quick-view-single").click(function(e){
|
||||
e.preventDefault();
|
||||
var single_container = jQuery(this).parent().parent().find('.wcmp-quick-view-wrapper');
|
||||
var html = single_container.html();
|
||||
jQuery(".quick-view-single-product").html(html);
|
||||
jQuery(".quick-view-single-product").fadeIn('fast');
|
||||
jQuery(".quick-view-single-product .wcmp-image-carousel").slick({
|
||||
arrows: true,
|
||||
infinite: true,
|
||||
speed: 500,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
});
|
||||
var is_variation = jQuery(".quick-view-single-product").find('.variations_form').length;
|
||||
if(is_variation != 0)
|
||||
{
|
||||
jQuery( '.variations_form' ).wc_variation_form();
|
||||
jQuery( '.variations_form .variations select' ).change();
|
||||
}
|
||||
add_woocomposer_popupclass();
|
||||
});
|
||||
jQuery(".quick-view-loop-popup").click(function(e){
|
||||
e.preventDefault();
|
||||
// var single_container = jQuery(this).parent().parent().parent().find('.wcmp-quick-view-wrapper');
|
||||
var single_container = jQuery(this).closest('.wooproduct').find('.wcmp-quick-view-wrapper');
|
||||
var html = single_container.html();
|
||||
jQuery(".quick-view-single-product").html(html);
|
||||
jQuery(".quick-view-single-product").fadeIn('fast');
|
||||
jQuery(".quick-view-single-product .wcmp-image-carousel").slick({
|
||||
arrows: true,
|
||||
infinite: true,
|
||||
speed: 500,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
});
|
||||
var is_variation = jQuery(".quick-view-single-product").find('.variations_form').length;
|
||||
if(is_variation != 0)
|
||||
{
|
||||
jQuery( '.variations_form' ).wc_variation_form();
|
||||
jQuery( '.variations_form .variations select' ).change();
|
||||
}
|
||||
add_woocomposer_popupclass();
|
||||
});
|
||||
jQuery('body').on('click','.wcmp-close-single',function(){
|
||||
jQuery(".quick-view-single-product").fadeOut(500);
|
||||
jQuery('html').removeClass('woocomposer-popup');
|
||||
});
|
||||
jQuery(".wcmp-single-image-carousel").slick({
|
||||
arrows: true,
|
||||
infinite: true,
|
||||
draggable: false,
|
||||
speed: 500,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
});
|
||||
});
|
||||
jQuery(document).on('viewLoaded',function(){
|
||||
jQuery(".wcmp-view-wrap .wcmp-image-carousel").slick({
|
||||
arrows: true,
|
||||
infinite: true,
|
||||
speed: 500,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
});
|
||||
var contentHeightNew = jQuery('.wcmp-view-content').height();
|
||||
jQuery(".wcmp-view-wrap").animate({height:contentHeightNew},{duration:500,complete:function(){
|
||||
var wHeight = (jQuery(window).innerHeight() - contentHeightNew) / 2;
|
||||
var topMargin = jQuery(".wcmp-view-wrap").offset().top - wHeight;
|
||||
jQuery('html, body').animate(
|
||||
{
|
||||
scrollTop:topMargin
|
||||
},
|
||||
{
|
||||
duration: 500,
|
||||
complete:function(){
|
||||
//jQuery(this).trigger('viewLoaded');
|
||||
}
|
||||
});
|
||||
}});
|
||||
var is_variation = jQuery(".wcmp-view-wrap").find('.variations_form').length;
|
||||
if(is_variation != 0)
|
||||
{
|
||||
jQuery( '.variations_form' ).wc_variation_form();
|
||||
jQuery( '.variations_form .variations select' ).change();
|
||||
}
|
||||
});
|
||||
jQuery(window).scroll(function(){
|
||||
animate_products();
|
||||
});
|
||||
jQuery(window).load(function(){
|
||||
animate_products();
|
||||
var inline_vc = jQuery('.woocomposer_carousel').find('.wcmp_vc_inline').length;
|
||||
if(inline_vc >= 1){
|
||||
var woo_carousel = jQuery(".woocomposer_carousel");
|
||||
woo_carousel.each(function(index, element) {
|
||||
var id = jQuery(this).attr('id');
|
||||
var carousel_opts = jQuery(this).attr('data-slick');
|
||||
jQuery("#"+id+" > .woocomposer").slick(carousel_opts);
|
||||
var products = jQuery("#"+id+" > .woocomposer").find(".wooproduct").length;
|
||||
jQuery("#"+id+" > .woocomposer").find("slick-track").css('width',300 * products);
|
||||
jQuery("#"+id+" > .woocomposer").find(".wooproduct").each(function(index, element) {
|
||||
jQuery(this).css('width',300+'px');
|
||||
});
|
||||
console.log(inline_vc);
|
||||
});
|
||||
jQuery(".quick-view-single-product .wcmp-image-carousel, .wcmp-single-image-carousel").each(function(index, element) {
|
||||
jQuery(this).slick({
|
||||
arrows: true,
|
||||
infinite: true,
|
||||
draggable: false,
|
||||
speed: 500,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
jQuery(window).resize(function(e) {
|
||||
add_woocomposer_popupclass();
|
||||
});
|
||||
function animate_products(){
|
||||
jQuery(".wooproduct").each(function(index, element) {
|
||||
var id = jQuery(this).attr('id');
|
||||
var animate = jQuery(this).data('animation');
|
||||
if(animate !== "animated no-animation"){
|
||||
// if(isOnScreen("#"+id)){
|
||||
jQuery("#"+id).addClass(animate);
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
function isOnScreen(id){
|
||||
var win = jQuery(window);
|
||||
var viewport = {
|
||||
top : win.scrollTop(),
|
||||
left : win.scrollLeft()
|
||||
};
|
||||
var productHeight = jQuery(id).outerHeight()-80;
|
||||
viewport.right = viewport.left + win.width();
|
||||
viewport.bottom = viewport.top + win.height() - productHeight;
|
||||
var bounds = jQuery(id).offset();
|
||||
bounds.right = bounds.left + jQuery(id).outerWidth();
|
||||
bounds.bottom = bounds.top + jQuery(id).outerHeight();
|
||||
return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom));
|
||||
};
|
||||
function add_woocomposer_popupclass()
|
||||
{
|
||||
var xheight = jQuery('.quick-view-single-product > div').height();
|
||||
var wheight = jQuery(window).height();
|
||||
if(xheight >= wheight)
|
||||
jQuery('html').addClass('woocomposer-popup');
|
||||
else
|
||||
jQuery('html').removeClass('woocomposer-popup');
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/*
_ _ _ _
___| (_) ___| | __ (_)___
/ __| | |/ __| |/ / | / __|
\__ \ | | (__| < _ | \__ \
|___/_|_|\___|_|\_(_)/ |___/
|__/
Author: Ken Wheeler
Website: http://kenwheeler.github.io
Docs: http://kenwheeler.github.io/slick
Repo: http://github.com/kenwheeler/slick
Issues: http://github.com/kenwheeler/slick/issues
*/
/* global window, document, define, jQuery, setInterval, clearInterval */
(function(factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else {
factory(jQuery);
}
}(function($) {
'use strict';
var Slick = window.Slick || {};
Slick = (function() {
var instanceUid = 0;
function Slick(element, settings) {
var _ = this,
responsiveSettings, breakpoint;
_.defaults = {
accessibility: true,
arrows: true,
autoplay: false,
autoplaySpeed: 3000,
centerMode: false,
centerPadding: '50px',
cssEase: 'ease',
customPaging: function(slider, i) {
return '<button type="button">' + (i + 1) + '</button>';
},
dots: false,
draggable: true,
easing: 'linear',
fade: false,
infinite: true,
lazyLoad: 'ondemand',
onBeforeChange: null,
onAfterChange: null,
onInit: null,
onReInit: null,
pauseOnHover: true,
responsive: null,
slide: 'div',
slidesToShow: 1,
slidesToScroll: 1,
speed: 300,
swipe: true,
touchMove: true,
touchThreshold: 5,
useCSS: true,
vertical: false
};
_.initials = {
animating: false,
autoPlayTimer: null,
currentSlide: 0,
currentLeft: null,
direction: 1,
$dots: null,
listWidth: null,
listHeight: null,
loadIndex: 0,
$nextArrow: null,
$prevArrow: null,
slideCount: null,
slideWidth: null,
$slideTrack: null,
$slides: null,
sliding: false,
slideOffset: 0,
swipeLeft: null,
$list: null,
touchObject: {},
transformsEnabled: false
};
$.extend(_, _.initials);
_.activeBreakpoint = null;
_.animType = null;
_.animProp = null;
_.breakpoints = [];
_.breakpointSettings = [];
_.cssTransitions = false;
_.paused = false;
_.positionProp = null;
_.$slider = $(element);
_.$slidesCache = null;
_.transformType = null;
_.transitionType = null;
_.windowWidth = 0;
_.windowTimer = null;
_.options = $.extend({}, _.defaults, settings);
_.originalSettings = _.options;
responsiveSettings = _.options.responsive || null;
if (responsiveSettings && responsiveSettings.length > -1) {
for (breakpoint in responsiveSettings) {
if (responsiveSettings.hasOwnProperty(breakpoint)) {
_.breakpoints.push(responsiveSettings[
breakpoint].breakpoint);
_.breakpointSettings[responsiveSettings[
breakpoint].breakpoint] =
responsiveSettings[breakpoint].settings;
}
}
_.breakpoints.sort(function(a, b) {
return b - a;
});
}
_.autoPlay = $.proxy(_.autoPlay, _);
_.autoPlayClear = $.proxy(_.autoPlayClear, _);
_.changeSlide = $.proxy(_.changeSlide, _);
_.setPosition = $.proxy(_.setPosition, _);
_.swipeHandler = $.proxy(_.swipeHandler, _);
_.dragHandler = $.proxy(_.dragHandler, _);
_.keyHandler = $.proxy(_.keyHandler, _);
_.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
_.instanceUid = instanceUid++;
_.init();
}
return Slick;
}());
Slick.prototype.addSlide = function(markup, index, addBefore) {
var _ = this;
if (typeof(index) === 'boolean') {
addBefore = index;
index = null;
} else if (index < 0 || (index >= _.slideCount)) {
return false;
}
_.unload();
if (typeof(index) === 'number') {
if (indexLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
;(function($){$.fn.unveil=function(threshold,callback){var $w=$(window),th=threshold||0,retina=window.devicePixelRatio>1,attrib=retina?"data-src-retina":"data-src",images=this,loaded;this.one("unveil",function(){var source=this.getAttribute(attrib);source=source||this.getAttribute("data-src");if(source){this.setAttribute("src",source);if(typeof callback==="function")callback.call(this);}});function unveil(){var inview=images.filter(function(){var $e=$(this),wt=$w.scrollTop(),wb=wt+$w.height(),et=$e.offset().top,eb=et+$e.height();return eb>=wt-th&&et<=wb+th;});loaded=inview.trigger("unveil");images=images.not(loaded);}$w.scroll(unveil);$w.resize(unveil);unveil();return this;};})(window.jQuery||window.Zepto);
|
||||
+1
@@ -0,0 +1 @@
|
||||
function animate_products(){jQuery(".wooproduct").each(function(i,e){var t=jQuery(this).attr("id"),o=jQuery(this).data("animation");"animated no-animation"!==o&&jQuery("#"+t).addClass(o)})}function isOnScreen(i){var e=jQuery(window),t={top:e.scrollTop(),left:e.scrollLeft()},o=jQuery(i).outerHeight()-80;t.right=t.left+e.width(),t.bottom=t.top+e.height()-o;var s=jQuery(i).offset();return s.right=s.left+jQuery(i).outerWidth(),s.bottom=s.top+jQuery(i).outerHeight(),!(t.right<s.left||t.left>s.right||t.bottom<s.top||t.top>s.bottom)}function add_woocomposer_popupclass(){var i=jQuery(".quick-view-single-product > div").height();jQuery(window).height()<=i?jQuery("html").addClass("woocomposer-popup"):jQuery("html").removeClass("woocomposer-popup")}!function(a){a.fn.unveil=function(i,e){var t,n=a(window),r=i||0,o=1<window.devicePixelRatio?"data-src-retina":"data-src",s=this;function l(){var i=s.filter(function(){var i=a(this),e=n.scrollTop(),t=e+n.height(),o=i.offset().top,s=o+i.height();return e-r<=s&&o<=t+r});t=i.trigger("unveil"),s=s.not(t)}return this.one("unveil",function(){var i=this.getAttribute(o);(i=i||this.getAttribute("data-src"))&&(this.setAttribute("src",i),"function"==typeof e&&e.call(this))}),n.scroll(l),n.resize(l),l(),this}}(window.jQuery||window.Zepto),function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):i(jQuery)}(function(n){"use strict";var r,o=window.Slick||{};r=0,(o=function(i,e){var t,o,s=this;if(s.defaults={accessibility:!0,arrows:!0,autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(i,e){return'<button type="button">'+(e+1)+"</button>"},dots:!1,draggable:!0,easing:"linear",fade:!1,infinite:!0,lazyLoad:"ondemand",onBeforeChange:null,onAfterChange:null,onInit:null,onReInit:null,pauseOnHover:!0,responsive:null,slide:"div",slidesToShow:1,slidesToScroll:1,speed:300,swipe:!0,touchMove:!0,touchThreshold:5,useCSS:!0,vertical:!1},s.initials={animating:!1,autoPlayTimer:null,currentSlide:0,currentLeft:null,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1},n.extend(s,s.initials),s.activeBreakpoint=null,s.animType=null,s.animProp=null,s.breakpoints=[],s.breakpointSettings=[],s.cssTransitions=!1,s.paused=!1,s.positionProp=null,s.$slider=n(i),s.$slidesCache=null,s.transformType=null,s.transitionType=null,s.windowWidth=0,s.windowTimer=null,s.options=n.extend({},s.defaults,e),s.originalSettings=s.options,(t=s.options.responsive||null)&&-1<t.length){for(o in t)t.hasOwnProperty(o)&&(s.breakpoints.push(t[o].breakpoint),s.breakpointSettings[t[o].breakpoint]=t[o].settings);s.breakpoints.sort(function(i,e){return e-i})}s.autoPlay=n.proxy(s.autoPlay,s),s.autoPlayClear=n.proxy(s.autoPlayClear,s),s.changeSlide=n.proxy(s.changeSlide,s),s.setPosition=n.proxy(s.setPosition,s),s.swipeHandler=n.proxy(s.swipeHandler,s),s.dragHandler=n.proxy(s.dragHandler,s),s.keyHandler=n.proxy(s.keyHandler,s),s.autoPlayIterator=n.proxy(s.autoPlayIterator,s),s.instanceUid=r++,s.init()}).prototype.addSlide=function(i,e,t){var o=this;if("boolean"==typeof e)t=e,e=null;else if(e<0||e>=o.slideCount)return!1;o.unload(),"number"==typeof e?0===e&&0===o.$slides.length?n(i).appendTo(o.$slideTrack):t?n(i).insertBefore(o.$slides.eq(e)):n(i).insertAfter(o.$slides.eq(e)):!0===t?n(i).prependTo(o.$slideTrack):n(i).appendTo(o.$slideTrack),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).remove(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},o.prototype.animateSlide=function(i,e){var t={},o=this;!1===o.transformsEnabled?!1===o.options.vertical?o.$slideTrack.animate({left:i},o.options.speed,o.options.easing,e):o.$slideTrack.animate({top:i},o.options.speed,o.options.easing,e):!1===o.cssTransitions?n({animStart:o.currentLeft}).animate({animStart:i},{duration:o.options.speed,easing:o.options.easing,step:function(i){!1===o.options.vertical?t[o.animType]="translate("+i+"px, 0px)":t[o.animType]="translate(0px,"+i+"px)",o.$slideTrack.css(t)},complete:function(){e&&e.call()}}):(o.applyTransition(),!1===o.options.vertical?t[o.animType]="translate3d("+i+"px, 0px, 0px)":t[o.animType]="translate3d(0px,"+i+"px, 0px)",o.$slideTrack.css(t),e&&setTimeout(function(){o.disableTransition(),e.call()},o.options.speed))},o.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},o.prototype.autoPlay=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer),i.slideCount>i.options.slidesToShow&&!0!==i.paused&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},o.prototype.autLine truncated
|
||||
Reference in new issue
Block a user