Если я правильно понял, то так
https://jsfiddle.net/6jhrtkLy/2/
Может так
$('.slider').each(function() { // slick slider $(this).slick({ //some param }) })
var Some = function (obj) { this.checkProp = function() { if(obj) { for (var prop in obj) { if (this.hasOwnProperty(prop)) { this[prop] = obj[prop]; } } } } this.hello = 'hello', this.sayHello = function() { console.log( this.hello ); }, this.init = function() { self = this; this.checkProp(); self.sayHello(); } } var mySome = new Some({ hello: 'hello2' }) mySome.init();
Не совсем понятно что вы хотите, но можете попробовать так.
Или так
const Some = { hello: 'hello', sayHello: function() { console.log( this.hello ); }, init: function(setting) { self = this; this.hello = setting.hello ? setting.hello : this.hello; self.sayHello(); } } Some.init({ hello: 'hello2' });
Насколько я понял, вам нужно это.https://jsfiddle.net/q1bhc4n1/2/
Наверное как-то так https://jsfiddle.net/2fm4L5Lx/
Что ты не прыгало, нужно обнулить 3d transform
получится так
.box40 { margin:0 auto; overflow:hidden; width: 320px; height: 105px; } .box40 img { -moz-transition: all 1s ease-out; -o-transition: all 1s ease-out; -webkit-transition: all 1s ease-out; transition: all 1s ease-out; transform: translate3d(0, 0, 0); // обнуляем } .box40 img:hover{ -webkit-transform: scale(1.05); -moz-transform: scale(1.05); -o-transform: scale(1.05); transform: scale(1.05); }
У вас там фикс высоты слайдер ставит, а вы на мобиле фикс высотой перебиваете, поэтому контент не влазит. http://prntscr.com/e39mj4
Добавьте этот css в конец файла
@media (max-width: 767px) { .widget.layers-fantasic-widget.apnew-slider.row.slides.swiper-container[style] { height: auto!important; } .apnew-slider.slides .swiper-slide { height: auto!important; } .swiper-slide.invert.swiper-slide-active[style] { height: auto!important; } }
Пробуйте,
http://prntscr.com/drur3y
Недавно была похожая тема, почитайте здесь.
Пробуйте так
var ReviewsSlider = $(".reviews_slider");var flag = false; function ReviewsSliderInit() { var rBlockWidth = $("#reviews .review_photo_block").width(); if (rBlockWidth == 160 && flag) { ReviewsSlider.trigger("destroy.owl.carousel").removeClass("owl-carousel owl-loaded"); ReviewsSlider.find(".owl-stage-outer").children().unwrap(); flag = false; ReviewsSlider.owlCarousel({ items: 1, loop: true, mouseDrag: false, touchDrag: false, dots: false, nav: true, navText: "", animateOut: "slideOutUp", animateIn: "slideInUp", onInitialized: function() { setTimeout(function() { var height = $("#reviews").height(); $("#reviews .review_slide").css("height", height+"px"); },500); } }).on("change.owl.carousel", function(eventData) { if(eventData.property.name !== "position") return; var data = $(this).data("owlCarousel"), current = data.current(), next = eventData.property.value; data.settings.animateOut = next > current ? "slideOutUp" : "slideOutDown"; data.settings.animateIn = next > current ? "slideInUp" : "slideInDown"; }); } else if ( (rBlockWidth > 160 && !flag) || (rBlockWidth < 160 && !flag) ) { ReviewsSlider.trigger("destroy.owl.carousel").removeClass("owl-carousel owl-loaded"); ReviewsSlider.find(".owl-stage-outer").children().unwrap(); $("#reviews .review_slide").css("height", "auto"); flag = true; ReviewsSlider.owlCarousel({ items: 1, smartSpeed: 500, loop: true, mouseDrag: false, touchDrag: false, dots: false, nav: true, navText: "", autoHeight: true, onInitialized: function() { setTimeout(function() { $("#reviews .owl-height").css("height", "auto"); var height = $("#reviews .owl-height .active").height(); $("#reviews .owl-height").css("height", height+"px"); },500); } }); } } var ReviewsSliderTimeout; ReviewsSliderInit(); $(window).resize( function() { clearTimeout(ReviewsSliderTimeout); ReviewsSliderTimeout = setTimeout(ReviewsSliderInit, 500); });