Home (2024)

'); } } }, error: function (d) { alert("Error"); } }); var delay = 1000; setTimeout(function() { WAFLBuilderPostCarousel = function (settings) { this.settings = settings.settings; this.transitionType = settings.transition; this.nodeClass = '.fl-node-' + settings.id; this.wrapperClass = this.nodeClass + ' .fl-post-carousel-wrapper'; this.postClass = this.nodeClass + ' .fl-post-carousel-post'; this.prevCarouselBtn = $(this.nodeClass + ' .carousel-prev'); this.nextCarouselBtn = $(this.nodeClass + ' .carousel-next'); this.layout = settings.layout; this.navigation = settings.navigationControls; this.slideWidth = settings.slideWidth; this.currentBrowserWidth = $(window).width(); if (this._hasPosts()) { //alert('yes'); this._initCarousel(); $(window).on('resize', function (e) { var width = $(window).width(); if (width != this.currentBrowserWidth) { this._resizeDebounce(); this.currentBrowserWidth = width; } }.bind(this)); } else { //alert('no'); } }; WAFLBuilderPostCarousel.prototype = { settings: {}, nodeClass: '', wrapperClass: '', postClass: '', prevCarouselBtn: '', nextCarouselBtn: '', layout: '', navigation: false, slideWidth: 0, carousel: '', _hasPosts: function () { return $(this.postClass).length > 0; }, _resizeDebounce: function () { clearTimeout(this.resizeTimer); this.resizeTimer = setTimeout(function () { this._reloadCarousel(); }.bind(this), 250); }, _getSlidesNumber: function () { var $wrapperWidth = $(this.nodeClass + ' .fl-post-carousel').width(), $slideWidth = $(this.postClass).width(), columns = Math.ceil($wrapperWidth / this.slideWidth); return columns; }, _getSlideWidth: function () { return Math.ceil(($(this.nodeClass + ' .fl-post-carousel').width() - (this.settings.slideMargin * (this._getSlidesNumber() - 1))) / this._getSlidesNumber()); }, _getSettings: function () { var newSettings, settings = { slideWidth: this._getSlideWidth(), minSlides: this._getSlidesNumber(), maxSlides: this._getSlidesNumber(), onSliderLoad: function () { $(this.wrapperClass).addClass('fl-post-carousel-loaded'); }.bind(this), } newSettings = $.extend({}, this.settings, settings); return newSettings; }, _initCarousel: function () { this.carousel = $(this.wrapperClass).bxSlider( this._getSettings() ); if (this.navigation) { this.prevCarouselBtn.on('click', function (e) { e.preventDefault(); this.carousel.goToPrevSlide(); }.bind(this)); this.nextCarouselBtn.on('click', function (e) { e.preventDefault(); this.carousel.goToNextSlide(); }.bind(this)); } }, _reloadCarousel: function () { this.carousel.reloadSlider(this._getSettings()); }, }; new WAFLBuilderPostCarousel({ id: '593ae829a39ce', layout: 'grid', slideWidth: 300, settings: { auto: true, pause: 5000, speed: 1000, infiniteLoop: true, adaptiveHeight: true, controls: false, autoHover: true, slideMargin: 30, moveSlides: 1, } }); }, delay); });

Home (2024)
Top Articles
Latest Posts
Article information

Author: Lilliana Bartoletti

Last Updated:

Views: 5325

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Lilliana Bartoletti

Birthday: 1999-11-18

Address: 58866 Tricia Spurs, North Melvinberg, HI 91346-3774

Phone: +50616620367928

Job: Real-Estate Liaison

Hobby: Graffiti, Astronomy, Handball, Magic, Origami, Fashion, Foreign language learning

Introduction: My name is Lilliana Bartoletti, I am a adventurous, pleasant, shiny, beautiful, handsome, zealous, tasty person who loves writing and wants to share my knowledge and understanding with you.