Viewing 30 results - 31 through 60 (of 167 total)
  • Author
    Search Results
  • #1291326

    Hi,
    Unfortunately, I don’t think so without removing the customizations that Enfold requires for the other functions for woocommerce, and I don’t believe that is possible without major issues, you could try this thread but at the end it seemed to cause more issues.

    Best regards,
    Mike

    #1273377

    Hey keifygeorge,

    Enfold does not have the infinite scroll, you might want to use a plugin like one of these:

    Infinite Product Scroll For WooCommerce

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1254846

    Hi,
    Issue wasn’t in Javascript. Just needed the exact selectors/classes. After hours playing around, resolved the issue. In case anyone else has a similar problem, here are the selectors needed for load more/infinite scroll on archive pages…worked for me:
    Navigation Selector: .pagination
    Next Selector: .pagination a.next_page
    Item Selector: article
    Content Selector: #main

    #1253626

    Hi dlrms,

    Please have a look at the following thread:

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1236232

    Solution:
    #top .scroll-down-link {
    -webkit-animation: av_pulsate 2s linear infinite !important;
    animation: av_pulsate 2s linear infinite !important;
    }

    Found @ https://kriesi.at/documentation/enfold/animation/:
    avia_appear
    avia_image_appear
    avia_hotspot_appear
    avia_appear_short
    avia_msonry_show
    avia_fade_move_down
    avia_slide_down
    avia_expand
    avia-ltr
    avia-rtl
    avia-btt
    avia-ttb
    avia-fadein
    avia-rotateIn
    avia-rotateInUpLeft
    avia-rotateInUpRight
    avia-bg-move
    caption-right
    caption-left
    caption-top
    caption-bottom
    av_pulsate
    sonarEffect
    avia_pop
    avia_pop_small
    avia_pop_loader
    avia_shrink
    av-load8

    And the hint how to use on https://kriesi.at/support/reply/777240/

    Uff!
    Thanks!

    #1236222

    Hey tremblayly,

    Well, you can try to look for a plugin (like Infinite scroll) or use masonry to show your portfolio which has the load more function.

    Best regards,
    Victoria

    #1236204
    agunda
    Participant

    Hello, brainiacs,

    I want to have a simple fade-in/out instead of the movement down. Now I have read about the statement ” pulse “, but it does not work for me. What am I doing wrong?

    Original:
    #top .scroll-down-link {
    -webkit-animation: avia_fade_move_down 2s ease-in-out infinite;
    animation: avia_fade_move_down 2s ease-in-out infinite;
    }

    Thanks for info
    Chriss

    #1222652

    Hi,
    Thanks for the screenshot and the link, so if you disable the “YITH Infinite scrolling plugin” then the page loads correctly?
    Typically to exclude media from lazy loading you would use the class skip-lazy and the attribute data-skip-lazy but I can’t find this in their documentation so I’m not sure if these are the exact terms to add to your grid to disable on the page. Try asking the “YITH Infinite scrolling” support if these are the correct terms to use.
    The script above runs on page load and I don’t see any triggers from “YITH Infinite scrolling” when it adds more items to the grid to fire the script, so disabling it on the page is probably your best option.

    Best regards,
    Mike

    #1220094

    Hi,
    Sorry for the late reply and thanks for the links, on your page that is “correct” I see this:
    2020-06-06_201355.png
    Is this really correct?
    I didn’t find this on your /materjalid/ page, but when I re-read your question and see that you are using “YITH Infinite scrolling plugin” which is lazy loading the product grid which may not work with the solution you have used because the script above runs on page load but your plugin adds more items to the grid without loading the page or giving a trigger, so I don’t believe this will work for you.

    Best regards,
    Mike

    #1214441
    leahmessina
    Participant

    Is there a way to make the partner element an infinite carousel of images? The partner element allows you to slide the same number of columns you have set as visible. What if instead of sliding to the next set of columns, it slides column by column, to create that infinite scrolling effect.

    The link inside the private content area has a partner logo slider under the hero banner with three columns and slides to the next three columns. This is the slider I would like to “infinitely scroll”

    #1210933

    Topic: Pagination

    in forum Enfold
    lsrmedia
    Participant

    Are there any pagination options for blog posts as I cannot find any options under the theme options.

    Ideally I would like either infinite scroll or even a load more button that will load more blog posts.

    I have searched this forum for answers but the posts (albeit over several years) have conflicting advice with some answering to use a certain plugin and others answering that plugins won’t work on this theme. The Jet Pack infinite scroll plugin seems to be mentioned multiple times as a viable option but I have also read other replies on this forum that state the infinite scroll from Jet Pack will not work with this theme.

    Can you provide some guidance?

    #1210265
    adplusdesign
    Participant

    Hello,
    I’ve used the jQuery solution to move the sale badge from the forum post: https://kriesi.at/support/topic/sale-badge-position/.

    // custom script
    add_action('wp_footer', 'ava_custom_script');
    function ava_custom_script(){
    ?>
    <script>
    (function($){
    	function h() {
    	$('#top .product').each(function() {
    		var onsale = $(this).find('.onsale'),
    			thumb = $(this).find('.thumbnail_container');
    
    		onsale.appendTo(thumb);
    	});
    	}
    
    	h();
    })(jQuery);
    </script>
    <?php
    }

    It works fine until I’ve added YITH Infinite scrolling plugin. How to modify this script that it will work then the products will be loaded throw ajax?

    #1199290

    I know tried this code:

    #top .scroll-down-link {
    -webkit-animation: scale-down-center 1s ease-in-out infinite alternate both;
    animation: scale-down-center 1s ease-in-out infinite alternate both;
    bottom: 40px;
    }

    But now there is no animation at all. Any ideas?

    #1199288

    Sorry, i’m not talking about the scroll to top button but the scroll down link, the arrow what sent you to the section down under.

    I dont understand your css code. What are the classes “.avia_pop_class, .avia-search-tooltip”? Or do I need to fill in my own class here? The class of the scroll down arrow is:

    #top .scroll-down-link {
        -webkit-animation: avia_fade_move_down 2s ease-in-out infinite;
        animation: avia_fade_move_down 2s ease-in-out infinite;
        bottom: 40px;
    }
    #1179540
    raslade
    Participant

    Hey

    Following up on the request from Ismael to stat a new thread for this subject.

    I’ve created a new page with the right code and only six posts.

    Thanks
    Richard

    ppietruczak
    Participant

    Hey,
    Thank you for your work and the exceptional theme.
    I am trying to implement infinite scroll with masonry gallery. I’m using jscroll. It’s almost working but there are some problems. First the content were loaded but the pictures were set as hidden and opacity to 0. I am wondering why the class containing gallery part is called
    <div class="av-masonry-container isotope av-js-disabled ">
    and
    <div class="av-masonry-entry isotope-item av-masonry-item-no-image ">
    I revealed pictures by setting css rules to:

    .av-masonry-entry {
        visibility: visible !important; 
        opacity: 1 !important; 
    }

    Next problem is related to the lightboxes. All loaded pictures by jscroll won’t open as a lightbox. Instead they open in a new tab as a whole picture. In developer tools I see that the events are not attached to the gallery entries.
    I enclose the code:

    add_action( 'wp_enqueue_scripts', 'load_jscroll' );
    
    function load_jscroll(){
    		wp_register_script('jscroll', 'https://cdnjs.cloudflare.com/ajax/libs/jscroll/2.4.1/jquery.jscroll.min.js', false, '1.11.3');
        wp_enqueue_script('jscroll');
    }
    
    function infinite_scroll() {
        global $avia_config;
            echo '<script type="text/javascript">
                jQuery( "#works-grid" ).jscroll( {
                debug: true,
                nextSelector: "span.current + a",
                contentSelector: ".works-grid",
                autoTrigger: true
            } )
            </script>';
    }
    
    add_action( 'wp_footer', 'infinite_scroll' );

    What am I doing wrong?

    #1130523

    Hi,
    Thank you for the login. I looked at your test slider page but the background color doesn’t show until the page is scrolled, and then the whole page flashes. But this also occur without the css. You are right about the steep learning curve, I didn’t know about this transition.
    Perhaps try this css in the Quick CSS field for the background color to show before scrolling:

    #top.page-id-11675 .ls-slide-backgrounds {
      width:100%;
      height:100%;
      color:black;
      font-weight:bold;
      animation: myanimation 10s infinite;
    }
    
    @keyframes myanimation {
      0% {background-color: red;}
      25%{background-color:yellow;}
      50%{background-color:green;}
      75%{background-color:brown;}
      100% {background-color: red;}
    }

    Best regards,
    Mike

    #1124022

    Hey FelixB,

    Thank you for using Enfold.

    There are free plugins that you can use to load more posts by scrolling. Unfortunately, they are not compatible with the theme or with the posts elements by default, so you have to find a way to get around that. Here’s a few choices:

    // https://wordpress.org/plugins/yith-infinite-scrolling/
    // https://wordpress.org/plugins/ajax-load-more/
    // https://jetpack.com/support/infinite-scroll/

    Best regards,
    Ismael

    #1123549
    FelixB
    Participant

    I have a question regarding an infinite scroll function. We are looking for a way to have more posts being displayed without clicking a „load more“ button. For example when the user is scrolling past the posts that are currently displayed, additional posts should be loaded. Is there a way to integrate this within Enfold?

    I’m looking forward to your feedback.

    Best regards
    Fabian

    #1068763

    In reply to: Demo content

    Hey Terrassenkind,

    Please enable debug mode in order to see builder shortcodes: https://kriesi.at/documentation/enfold/intro-to-advanced-layout-builder/#debug-mode, then add this to your content:

    [av_section min_height='' min_height_px='500px' padding='large' shadow='no-border-styling' bottom_border='border-extra-diagonal' bottom_border_diagonal_color='#ffffff' bottom_border_diagonal_direction='border-extra-diagonal-inverse' bottom_border_style='' id='contact' color='main_color' custom_bg='#f8f8f8' src='' attachment='' attachment_size='' attach='scroll' position='top right' repeat='stretch' video='' video_ratio='16:9' overlay_opacity='0.2' overlay_color='#ffffff' overlay_pattern='' overlay_custom_pattern='' av_uid='av-2aqedq']
    [av_heading tag='h3' padding='40' heading='Contact' color='' style='blockquote modern-quote' custom_font='' size='65' subheading_active='' subheading_size='15' custom_class='' av_uid='av-7k586'][/av_heading]
    
    [av_one_half first min_height='' vertical_alignment='av-align-top' space='' margin='0px' margin_sync='true' padding='0px' padding_sync='true' border='' border_color='' radius='0px' radius_sync='true' background_color='' src='' attachment='' attachment_size='' background_position='top left' background_repeat='no-repeat' animation='right-to-left' mobile_display='' av_uid='av-1uh12u']
    
    [av_contact email='' title='' button='Submit' on_send='' sent='Your message has been sent!' link='manually,http://' subject='' autorespond='' captcha='' hide_labels='aviaTBhide_labels' form_align='' color='av-custom-form-color av-dark-form' av_uid='av-1rb732']
    [av_contact_field label='Name' type='text' options='' check='is_empty' width='' multi_select='' av_uid='av-1ibmxq'][/av_contact_field]
    [av_contact_field label='E-Mail' type='text' check='is_email' options='' multi_select='' width='' av_uid='av-1cy3ce'][/av_contact_field]
    [av_contact_field label='Message' type='textarea' check='is_empty' options='' multi_select='' width='' av_uid='av-1aljd2'][/av_contact_field]
    [/av_contact]
    
    [/av_one_half][av_one_fourth min_height='' vertical_alignment='av-align-top' space='' margin='0px' margin_sync='true' padding='0px' padding_sync='true' border='' border_color='' radius='0px' radius_sync='true' background_color='' src='' attachment='' attachment_size='' background_position='top left' background_repeat='no-repeat' animation='right-to-left' mobile_display='' av_uid='av-128rfi']
    
    [av_textblock size='' font_color='' color='' av_uid='av-utcvy']
    <h2>Address</h2>
    10800 West Pico Boulevard Infinity Loop
    Cupertino, Los Angeles, USA
    <h2>Contact</h2>
     (Email address hidden if logged out) 
    555-3587 347
    <h2></h2>
    [/av_textblock]
    
    [/av_one_fourth][av_one_fourth min_height='' vertical_alignment='av-align-top' space='' margin='0px' margin_sync='true' padding='0px' padding_sync='true' border='' border_color='' radius='0px' radius_sync='true' background_color='' src='' attachment='' attachment_size='' background_position='top left' background_repeat='no-repeat' animation='right-to-left' mobile_display='' av_uid='av-pbp5a']
    
    [av_textblock size='' font_color='' color='' av_uid='av-n4l5i']
    <h2>Opening Hours:</h2>
    Mo-Fr: 8:00-19:00
    Sa: 8:00-14:00
    So: closed
    [/av_textblock]
    
    [/av_one_fourth]
    [/av_section]
    
    [av_google_map height='400px' zoom='16' saturation='fill' hue='#ffffff' zoom_control='aviaTBzoom_control' av_uid='av-ghjfy']
    [av_gmap_location address='Infinite Loop' city='Cupertino' country='' long='-122.03077589999998' lat='37.332112' marker='197' imagesize='40' av_uid='av-9s9hi'][/av_gmap_location]
    [/av_google_map]

    Best regards,
    Rikard

    #1047768

    In reply to: Infinite Scroll

    The problem is that enfold has priorities on the woocommerce files

    please see this thread:

    Lazy load / Infinite Scroll for Woocommerce Shop pages

    I am still waiting on the new fixes for the latest update though, as doing this places a space at the top of the page.

    #1047767
    MrPoBoi
    Participant

    I would like to add my lazy load / infinite scrolling back to my theme.

    I was following this post in order to complete it:

    Lazy load / Infinite Scroll for Woocommerce Shop pages

    But after the latest update, after I get done editing my woocommerce config file I get a blank space at the top of my page.

    Can someone please give me an updated version on how to accomplish this correctly?

    Everything works, but I can not figure out how to close out the page correctly after removing the enfold pagination, I think… so I get the space at the top of my page.

    Thanks in advance for any assistance.

    #1043763

    You can accomplish that by just a little bit of CSS animation.

    More info: https://www.w3schools.com/css/css3_animations.asp

    Example which creates nearly the result you want: https://css-tricks.com/infinite-all-css-scrolling-slideshow/

    dannhanks
    Participant

    Hi, I am using Ajax Pagination and Infinite Scroll to add a load more button to my grid style blog posts. I cant get this to work as it’s looking for a ‘Next Selector’ (The selector of the navigation next link.)

    I tried adding ‘.pagination a’ as the link but this simply reloads the same posts again.

    I am guessing that enfold does not use the ‘next posts’ and instead links direct to page 1, 2, 3 etc..?

    Is there a way to get a next selector?

    #992189
    neotronics
    Participant

    Hello, I have bought two plug-in in YITHThemes and they are not currently working with my Enfold webpage:

    Infinite scrolling by YITH
    Ajax product filter by YITH

    Maybe there is a conflict with the enfold default theme.

    My webpage is Neotronics.cl

    Thank you for your reply

    • This topic was modified 7 years, 5 months ago by neotronics. Reason: wrong link
    #977496
    matchwerk
    Participant

    Hey guys,

    great work on your template. Currently I’m working on the Ajax pagination for the portfolio grid. So it doesn’t reload the whole page with every portfolio page. I got so far with a plugin (called “Ajax Pagination and Infinite Scroll”) , that the new page is being loaded, but the images of the portfolio items are missing. Screenshot attended.
    However, the plugin offers me to add my own callback js code. Can you tell what I need to submit so the images reload?

    Thanks

    Hi Victoria!
    I have two problems:
    1.
    I am working with a child theme. and as far as i know with the next update of the theme this might be overwritten.

    2.
    Do i overwrite all this?:

    /* ======================================================================================================================================================
    Avia Slideshow
    ====================================================================================================================================================== */

    (function($)
    {
    “use strict”;

    $.AviaSlider = function(options, slider)
    {
    var self = this;

    this.$win = $( window );

    this.$slider = $( slider );

    this.isMobile = $.avia_utilities.isMobile;

    this._prepareSlides(options);

    //default preload images then init slideshow
    $.avia_utilities.preload({container: this.$slider , single_callback: function(){ self._init( options ); }});
    }

    $.AviaSlider.defaults = {

    //interval between autorotation switches
    interval:5,

    //autorotation active or not
    autoplay:false,

    //set if the loop will stop at the last/first slide or if the slides will loop infinite
    //set to false for infinite loop, “last” to stop at the last slide or “first” to stop at the first slide
    stopinfiniteloop: false,

    //fade or slide animation
    animation:’slide’,

    //transition speed when switching slide
    transitionSpeed:900,

    //easing method for the transition
    easing:’easeInOutQuart’,

    //slide wrapper
    wrapElement: ‘>ul’,

    //slide element
    slideElement: ‘>li’,

    //pause if mouse cursor is above item
    hoverpause: false,

    //attach images as background
    bg_slider: false,

    //delay of miliseconds to wait before showing the next slide
    show_slide_delay: 0,

    //if slider animation is set to “fade” the fullfade property sets the crossfade behaviour
    fullfade: false,

    //enable carousel mode with multiple visible slides
    carousel: ‘no’,

    // how many slides are displayed at once in the carousel
    carouselSlidesToShow: 3,

    // TODO: how many slides are scrolled in the carousel
    carouselSlidesToScroll: 1,

    // responsive carousel
    carouselResponsive : new Array(),

    };

    $.AviaSlider.prototype =
    {
    _init: function( options )
    {
    // set slider options
    this.options = this._setOptions(options);

    //slidewrap
    this.$sliderUl = this.$slider.find(this.options.wrapElement);

    // slide elements
    this.$slides = this.$sliderUl.find(this.options.slideElement);

    // goto dots
    this.gotoButtons = this.$slider.find(‘.avia-slideshow-dots a’);

    //perma caption
    this.permaCaption = this.$slider.find(‘>.av-slideshow-caption’);

    // slide count
    this.itemsCount = this.$slides.length;

    // current image index
    this.current = 0;

    // current carousel index
    this.currentCarousel = 0;

    // carousel slide width
    this.slideWidthCarousel = ‘240’;

    //loop count
    this.loopCount = 0;

    // control if the slicebox is animating
    this.isAnimating = false;

    // css browser prefix like -webkit-, -moz-
    this.browserPrefix = $.avia_utilities.supports(‘transition’);

    // css3 animation?
    this.cssActive = this.browserPrefix !== false ? true : false;

    // css3D animation?
    this.css3DActive = document.documentElement.className.indexOf(‘avia_transform3d’) !== -1 ? true : false;

    //store the aviaVideoApi object for the current slide if available
    this.video = false;

    //if we have a bg slider no images were preloaded yet. in that case start preloading and attaching images
    if(this.options.bg_slider == true)
    {
    //create array that holds all image urls to preload
    this.imageUrls = [];

    //create a preloader icon to indicate loading
    this.loader = $.avia_utilities.loading(this.$slider);

    //preload the images ony by one
    this._bgPreloadImages();

    }
    else //if it was a default slider all images are already loaded and we can start showing the slider
    {
    //kickoff the slider: bind functions, show first slide, if active start the autorotation timer
    this._kickOff();
    }

    if(this.options.carousel === ‘yes’){
    this.options.animation = ‘carouselslide’;
    }
    },

    //set the slider options by first merging the efault options and the passed options, then checking the slider element if any data attributes overwrite the option set
    _setOptions: function(options)
    {
    var newOptions = $.extend( true, {}, $.AviaSlider.defaults, options ),
    htmlData = this.$slider.data(),
    i = “”;

    //overwritte passed option set with any data properties on the html element
    for (i in htmlData)
    {
    if (htmlData.hasOwnProperty(i))
    {
    if(typeof htmlData[i] === “string” || typeof htmlData[i] === “number” || typeof htmlData[i] === “boolean”)
    {
    newOptions[i] = htmlData[i];
    }
    }
    }

    return newOptions;
    },

    _prepareSlides: function(options)
    {
    //if its a mobile device find all video slides that need to be altered
    if(this.isMobile)
    {
    var alter = this.$slider.find(‘.av-mobile-fallback-image’);
    alter.each(function()
    {
    var current = $(this).removeClass(‘av-video-slide’).data({‘avia_video_events’: true, ‘video-ratio’:0}),
    fallback = current.data(‘mobile-img’),
    fallback_link = current.data(‘fallback-link’),
    appendTo = current.find(‘.avia-slide-wrap’);

    current.find(‘.av-click-overlay, .mejs-mediaelement, .mejs-container’).remove();

    if(!fallback)
    {
    $(‘<p class=”av-fallback-message”><span>Please set a mobile device fallback image for this video in your wordpress backend</span></p>’).appendTo(appendTo);
    }

    if(options && options.bg_slider)
    {
    current.data(‘img-url’, fallback);

    //if we got a fallback link we need to either replace the default link on mobile devices, or if there is no default link change the wrapping <div> to an
    if(fallback_link != “”)
    {
    if(appendTo.is(‘a’))
    {
    appendTo.attr(‘href’, fallback_link);
    }
    else
    {
    appendTo.find(‘a’).remove();
    appendTo.replaceWith(function(){
    var cur_slide = $(this);
    return $(“
    “).attr({‘data-rel’: cur_slide.data(‘rel’), ‘class’: cur_slide.attr(‘class’), ‘href’: fallback_link} ).append( $(this).contents() );
    });

    appendTo = current.find(‘.avia-slide-wrap’);
    }

    if($.fn.avia_activate_lightbox)
    {
    current.parents(‘#main’).avia_activate_lightbox();
    }
    }
    }
    else
    {
    var image = $(‘‘);
    var lightbox = false;

    if( ‘string’ == typeof fallback_link && fallback_link.trim() != ” )
    {
    image = $(‘
    ‘ + image + ‘‘);
    lightbox = true;
    }

    if( lightbox && $.fn.avia_activate_lightbox)
    {
    current.parents(‘#main’).avia_activate_lightbox();
    }

    current.find(‘.avia-slide-wrap’).append(image);
    }

    });
    }

    },

    //start preloading the background images
    _bgPreloadImages : function(callback)
    {
    this._getImageURLS();

    this._preloadSingle(0, function()
    {
    this._kickOff();
    this._preloadNext(1);
    });
    },

    //if we are using a background image slider, fetch the images from a data attribute and preload them one by one
    _getImageURLS: function()
    {
    var _self = this;

    //collect url strings of the images to preload
    this.$slides.each(function(i)
    {
    _self.imageUrls[i] = [];
    _self.imageUrls[i][‘url’] = $(this).data(“img-url”);

    //if no image is passed we can set the slide to loaded
    if(typeof _self.imageUrls[i][‘url’] == ‘string’)
    {
    _self.imageUrls[i][‘status’] = false;
    }
    else
    {
    _self.imageUrls[i][‘status’] = true;
    }
    });
    },

    _preloadSingle: function(key, callback)
    {
    var _self = this,
    objImage = new Image();

    if(typeof _self.imageUrls[key][‘url’] == ‘string’)
    {
    $(objImage).bind(‘load error’, function()
    {
    _self.imageUrls[key][‘status’] = true;
    _self.$slides.eq(key).css(‘background-image’,’url(‘ + _self.imageUrls[key][‘url’] + ‘)’);
    if(typeof callback == ‘function’) callback.apply( _self, [objImage, key] );
    });

    if(_self.imageUrls[key][‘url’] != “”)
    {
    objImage.src = _self.imageUrls[key][‘url’];
    }
    else
    {
    $(objImage).trigger(‘error’);
    }
    }
    else
    {
    if(typeof callback == ‘function’) callback.apply( _self, [objImage, key] );
    }
    },

    _preloadNext: function(key)
    {
    if(typeof this.imageUrls[key] != “undefined”)
    {
    this._preloadSingle(key, function()
    {
    this._preloadNext(key + 1);
    });
    }
    },

    //bind click events of slide controlls to the public functions
    _bindEvents: function()
    {
    var self = this,
    win = $( window );

    this.$slider.on(‘click’,’.next-slide’, $.proxy( this.next, this) );
    this.$slider.on(‘click’,’.prev-slide’, $.proxy( this.previous, this) );
    this.$slider.on(‘click’,’.goto-slide’, $.proxy( this.go2, this) );

    if(this.options.hoverpause)
    {
    this.$slider.on(‘mouseenter’, $.proxy( this.pause, this) );
    this.$slider.on(‘mouseleave’, $.proxy( this.resume, this) );
    }

    if(this.options.stopinfiniteloop && this.options.autoplay)
    {
    if(this.options.stopinfiniteloop == ‘last’)
    {
    this.$slider.on(‘avia_slider_last_slide’, $.proxy(this._stopSlideshow, this) );
    }
    else if(this.options.stopinfiniteloop == ‘first’)
    {
    this.$slider.on(‘avia_slider_first_slide’, $.proxy(this._stopSlideshow, this) );
    }
    }

    if (this.options.carousel === ‘yes’){
    // recalculate carousel dimensions on viewport size change
    win.on( ‘debouncedresize’, $.proxy( this._buildCarousel, this) );
    }
    else{
    win.on( ‘debouncedresize.aviaSlider’, $.proxy( this._setSize, this) );
    }

    //if its a desktop browser add arrow navigation, otherwise add touch nav
    if(!this.isMobile)
    {
    this.$slider.avia_keyboard_controls();
    }
    else
    {
    this.$slider.avia_swipe_trigger();
    }

    self._attach_video_events();
    },

    //kickoff the slider by binding all functions to slides and buttons, show the first slide and start autoplay
    _kickOff: function()
    {
    var self = this,
    first_slide = self.$slides.eq(0),
    video = first_slide.data(‘video-ratio’);

    // bind events to to the controll buttons
    self._bindEvents();

    this.$slider.removeClass(‘av-default-height-applied’);

    //show the first slide. if its a video set the correct size, otherwise make sure to remove the % padding
    if(video)
    {
    self._setSize(true);
    }
    else
    {
    if(this.options.keep_pading != true)
    {
    self.$sliderUl.css(‘padding’,0);
    self.$win.trigger(‘av-height-change’);
    }
    }

    self._setCenter();
    if ( this.options.carousel === ‘no’ ) {
    first_slide.css({visibility:’visible’, opacity:0}).avia_animate({opacity:1}, function()
    {
    var current = $(this).addClass(‘active-slide’);

    if(self.permaCaption.length)
    {
    self.permaCaption.addClass(‘active-slide’);
    }
    });
    }

    // start autoplay if active
    if( self.options.autoplay )
    {
    self._startSlideshow();
    }

    // prepare carousel if active
    if (self.options.carousel === ‘yes’) {
    self._buildCarousel();
    }

    self.$slider.trigger(‘_kickOff’);

    },

    _buildCarousel : function(){

    var self = this,
    stageWidth = this.$slider.outerWidth(),
    slidesWidth = parseInt(stageWidth / this.options.carouselSlidesToShow),
    windowWidth = window.innerWidth || $(window).width();

    // responsive carousel
    if ( this.options.carouselResponsive &&
    this.options.carouselResponsive.length &&
    this.options.carouselResponsive !== null) {

    for (var breakpoint in this.options.carouselResponsive){
    var breakpointValue = this.options.carouselResponsive[breakpoint][‘breakpoint’];
    var newSlidesToShow = this.options.carouselResponsive[breakpoint][‘settings’][‘carouselSlidesToShow’];

    if (breakpointValue >= windowWidth) {
    slidesWidth = parseInt(stageWidth / newSlidesToShow);
    this.options.carouselSlidesToShow = newSlidesToShow;
    }
    }
    }

    // set width and height for each slide
    this.slideWidthCarousel = slidesWidth;

    this.$slides.each(function(i){
    $(this).width(slidesWidth);
    });

    // set width for the UL
    var slideTrackWidth = slidesWidth * this.itemsCount;
    this.$sliderUl.width(slideTrackWidth).css(‘transform’, ‘translateX(0px)’);

    // hide nav if not needed
    if (this.options.carouselSlidesToShow >= this.itemsCount){
    this.$slider.find(‘.av-timeline-nav’).hide();
    }

    },

    //calculate which slide should be displayed next and call the executing transition function
    _navigate : function( dir, pos ) {

    if( this.isAnimating || this.itemsCount < 2 || !this.$slider.is(“:visible”) )
    {
    return false;
    }

    this.isAnimating = true;

    // current item’s index
    this.prev = this.current;

    // if position is passed
    if( pos !== undefined )
    {
    this.current = pos;
    dir = this.current > this.prev ? ‘next’ : ‘prev’;
    }

    // if not check the boundaries
    else if( dir === ‘next’ )
    {
    this.current = this.current < this.itemsCount – 1 ? this.current + 1 : 0;

    if( this.current === 0 && this.options.autoplay_stopper == 1 && this.options.autoplay )
    {
    this.isAnimating = false;
    this.current = this.prev;
    this._stopSlideshow();
    return false;
    }
    }
    else if( dir === ‘prev’ )
    {
    this.current = this.current > 0 ? this.current – 1 : this.itemsCount – 1;
    }

    //set goto button
    this.gotoButtons.removeClass(‘active’).eq(this.current).addClass(‘active’);

    //set slideshow size if carousel not in use
    if( this.options.carousel === ‘no’) {
    this._setSize();
    }

    //if we are using a background slider make sure that the image is loaded. if not preload it, then show the slide
    if(this.options.bg_slider == true)
    {
    if(this.imageUrls[this.current][‘status’] == true )
    {
    this[‘_’ + this.options.animation].call(this, dir);
    }
    else
    {
    this.loader.show();
    this._preloadSingle(this.current, function()
    {
    this[‘_’ + this.options.animation].call(this, dir);
    this.loader.hide();
    });
    }
    }
    else //no background loader -> images are already loaded
    {
    //call the executing function. for example _slide, or _fade. since the function call is absed on a var we can easily extend the slider with new animations
    this[‘_’ + this.options.animation].call(this, dir);
    }

    if(this.current == 0)
    {
    this.loopCount++;
    this.$slider.trigger(‘avia_slider_first_slide’);
    }
    else if(this.current == this.itemsCount – 1)
    {
    this.$slider.trigger(‘avia_slider_last_slide’);
    }
    else
    {
    this.$slider.trigger(‘avia_slider_navigate_slide’);
    }
    },

    //if the next slide has a different height than the current change the slideshow height
    _setSize: function(instant)
    {
    //if images are attached as bg images the slider has a fixed height
    if(this.options.bg_slider == true) return;

    var self = this,
    slide = this.$slides.eq(this.current),
    img = slide.find(‘img’),
    current = Math.floor(this.$sliderUl.height()),
    ratio = slide.data(‘video-ratio’),
    setTo = ratio ? this.$sliderUl.width() / ratio : Math.floor(slide.height()),
    video_height = slide.data(‘video-height’), //forced video height %. needs to be set only once
    video_toppos = slide.data(‘video-toppos’); //forced video top position

    this.$sliderUl.height(current).css(‘padding’,0); //make sure to set the slideheight to an actual value

    if(setTo != current)
    {
    if(instant == true)
    {
    this.$sliderUl.css({height:setTo});
    this.$win.trigger(‘av-height-change’);
    }
    else
    {
    this.$sliderUl.avia_animate({height:setTo}, function()
    {
    self.$win.trigger(‘av-height-change’);
    });
    }
    }

    this._setCenter();

    if(video_height && video_height!= “set”)
    {
    slide.find(‘iframe, embed, video, object, .av_youtube_frame’).css({height: video_height + ‘%’, top: video_toppos + ‘%’});
    slide.data(‘video-height’,’set’);
    }
    },

    _setCenter: function()
    {
    //if the image has a min width and is larger than the slider center it
    //positon img based on caption. right caption->left pos, left caption -> right pos
    var slide = this.$slides.eq(this.current),
    img = slide.find(‘img’),
    min_width = parseInt(img.css(‘min-width’),10),
    slide_width = slide.width(),
    caption = slide.find(‘.av-slideshow-caption’),
    css_left = ((slide_width – min_width) / 2);

    if(caption.length)
    {
    if(caption.is(‘.caption_left’))
    {
    css_left = ((slide_width – min_width) / 1.5);
    }
    else if(caption.is(‘.caption_right’))
    {
    css_left = ((slide_width – min_width) / 2.5);
    }
    }

    if(slide_width >= min_width)
    {
    css_left = 0;
    }

    img.css({left:css_left});
    },

    _carouselmove : function(){

    // var offset = (this.options.carouselSlidesToScroll*this.slideWidthCarousel)*this.currentCarousel;
    var offset = this.slideWidthCarousel*this.currentCarousel;
    this.$sliderUl.css(‘transform’, ‘translateX(-‘+offset+’px)’);

    },

    _carouselslide: function(dir){

    if (dir === ‘next’) {

    if (this.options.carouselSlidesToShow + this.currentCarousel < this.itemsCount){
    this.currentCarousel++;
    this._carouselmove();
    }
    }
    else if (dir === ‘prev’){
    if (this.currentCarousel > 0) {
    this.currentCarousel–;
    this._carouselmove();
    }
    }

    this.isAnimating = false;

    },

    _slide: function(dir)
    {
    var dynamic = false, //todo: pass by option if a slider is dynamic
    modifier = dynamic == true ? 2 : 1,
    sliderWidth = this.$slider.width(),
    direction = dir === ‘next’ ? -1 : 1,
    property = this.browserPrefix + ‘transform’,
    reset = {}, transition = {}, transition2 = {},
    trans_val = ( sliderWidth * direction * -1),
    trans_val2 = ( sliderWidth * direction) / modifier;

    //do a css3 animation
    if(this.cssActive)
    {
    property = this.browserPrefix + ‘transform’;

    //do a translate 3d transformation if available, since it uses hardware acceleration
    if(this.css3DActive)
    {
    reset[property] = “translate3d(” + trans_val + “px, 0, 0)”;
    transition[property] = “translate3d(” + trans_val2 + “px, 0, 0)”;
    transition2[property] = “translate3d(0,0,0)”;
    }
    else //do a 2d transform. still faster than a position “left” change
    {
    reset[property] = “translate(” + trans_val + “px,0)”;
    transition[property] = “translate(” + trans_val2 + “px,0)”;
    transition2[property] = “translate(0,0)”;
    }
    }
    else
    {
    reset.left = trans_val;
    transition.left = trans_val2;
    transition2.left = 0;
    }

    if(dynamic)
    {
    transition[‘z-index’] = “1”;
    transition2[‘z-index’] = “2”;
    }

    this._slide_animate(reset, transition, transition2);
    },

    _slide_up: function(dir)
    {
    var dynamic = true, //todo: pass by option if a slider is dynamic
    modifier = dynamic == true ? 2 : 1,
    sliderHeight = this.$slider.height(),
    direction = dir === ‘next’ ? -1 : 1,
    property = this.browserPrefix + ‘transform’,
    reset = {}, transition = {}, transition2 = {},
    trans_val = ( sliderHeight * direction * -1),
    trans_val2 = ( sliderHeight * direction) / modifier;

    //do a css3 animation
    if(this.cssActive)
    {
    property = this.browserPrefix + ‘transform’;

    //do a translate 3d transformation if available, since it uses hardware acceleration
    if(this.css3DActive)
    {
    reset[property] = “translate3d( 0,” + trans_val + “px, 0)”;
    transition[property] = “translate3d( 0,” + trans_val2 + “px, 0)”;
    transition2[property] = “translate3d(0,0,0)”;
    }
    else //do a 2d transform. still faster than a position “left” change
    {
    reset[property] = “translate( 0,” + trans_val + “px)”;
    transition[property] = “translate( 0,” + trans_val2 + “px)”;
    transition2[property] = “translate(0,0)”; }
    }
    else
    {
    reset.top = trans_val;
    transition.top = trans_val2;
    transition2.top = 0;
    }

    if(dynamic)
    {
    transition[‘z-index’] = “1”;
    transition2[‘z-index’] = “2”;
    }
    this._slide_animate(reset, transition, transition2);
    },

    //slide animation: do a slide transition by css3 transform if possible. if not simply do a position left transition
    _slide_animate: function( reset , transition , transition2 )
    {

    var self = this,
    displaySlide = this.$slides.eq(this.current),
    hideSlide = this.$slides.eq(this.prev);

    hideSlide.trigger(‘pause’);
    if( !displaySlide.data(‘disableAutoplay’) ) displaySlide.trigger(‘play’);

    displaySlide.css({visibility:’visible’, zIndex:4, opacity:1, left:0, top:0});
    displaySlide.css(reset);

    hideSlide.avia_animate(transition, this.options.transitionSpeed, this.options.easing);

    var after_slide = function()
    {
    self.isAnimating = false;
    displaySlide.addClass(‘active-slide’);
    hideSlide.css({visibility:’hidden’}).removeClass(‘active-slide’);
    self.$slider.trigger(‘avia-transition-done’);
    }

    if(self.options.show_slide_delay > 0)
    {
    setTimeout(function() { displaySlide.avia_animate(transition2, self.options.transitionSpeed, self.options.easing, after_slide); },self.options.show_slide_delay);
    }
    else
    {
    displaySlide.avia_animate(transition2, self.options.transitionSpeed, self.options.easing, after_slide);
    }

    },

    //simple fade transition of the slideshow
    _fade: function()
    {
    var self = this,
    displaySlide = this.$slides.eq(this.current),
    hideSlide = this.$slides.eq(this.prev),
    properties = {visibility:’visible’, zIndex:3, opacity:0},
    fadeCallback = function()
    {
    self.isAnimating = false;
    displaySlide.addClass(‘active-slide’);
    hideSlide.css({visibility:’hidden’, zIndex:2}).removeClass(‘active-slide’);
    self.$slider.trigger(‘avia-transition-done’);

    };

    hideSlide.trigger(‘pause’);
    if( !displaySlide.data(‘disableAutoplay’) ) displaySlide.trigger(‘play’);

    if(self.options.fullfade == true)
    {
    hideSlide.avia_animate({opacity:0}, 200, ‘linear’, function()
    {
    displaySlide.css(properties).avia_animate({opacity:1}, self.options.transitionSpeed, ‘linear’,fadeCallback);
    });
    }
    else
    {
    displaySlide.css(properties).avia_animate({opacity:1}, self.options.transitionSpeed/2, ‘linear’, function()
    {
    hideSlide.avia_animate({opacity:0}, 200, ‘linear’, fadeCallback);
    });
    }

    },

    /************************************************************************
    Video functions
    *************************************************************************/

    //bind events to the video that tell the slider to autorotate once a video has been played
    _attach_video_events: function()
    {
    var self = this, $html = $(‘html’);

    self.$slides.each(function(i)
    {
    var currentSlide = $(this),
    caption = currentSlide.find(‘.caption_fullwidth, .av-click-overlay’),
    mejs = currentSlide.find(‘.mejs-mediaelement’);

    if(currentSlide.data(‘avia_video_events’) != true)
    {
    currentSlide.data(‘avia_video_events’, true);

    currentSlide.on(‘av-video-events-bound’, { slide: currentSlide, wrap: mejs , iteration: i , self: self }, onReady);

    currentSlide.on(‘av-video-ended’, { slide: currentSlide , self: self}, onFinish);

    currentSlide.on(‘av-video-play-executed’, function(){ setTimeout(function(){ self.pause() }, 100); });

    caption.on(‘click’, { slide: currentSlide }, toggle);

    // also if the player was loaded before the _bindEvents function was bound trigger it manually
    if(currentSlide.is(‘.av-video-events-bound’)) currentSlide.trigger(‘av-video-events-bound’);
    }
    });

    //helper functions
    function onReady( event )
    {
    //autostart for first slide
    if(event.data.iteration === 0)
    {
    event.data.wrap.css(‘opacity’,0);
    if(!event.data.self.isMobile && !event.data.slide.data(‘disableAutoplay’))
    {
    event.data.slide.trigger(‘play’);

    setTimeout(function(){ event.data.wrap.avia_animate({opacity:1}, 400); }, 50);
    }
    else if ($html.is(‘.avia-msie’) && !event.data.slide.is(‘.av-video-service-html5’))
    {
    /*
    * Internet Explorer fires the ready event for external videos once they become visible
    * as oposed to other browsers which always fire immediately.
    */
    if( !event.data.slide.data(‘disableAutoplay’) ) event.data.slide.trigger(‘play’);
    }

    }

    function onFinish( event )
    {
    //if the video is not looped resume the slideshow
    if(!event.data.slide.is(‘.av-single-slide’) && !event.data.slide.is(‘.av-loop-video’))
    {
    event.data.slide.trigger(‘reset’);
    self._navigate( ‘next’ );
    self.resume();
    }

    //safari 8 workaround for self hosted videos which wont loop by default
    if(event.data.slide.is(‘.av-loop-video’) && event.data.slide.is(‘.av-video-service-html5’))
    {
    if($html.is(‘.avia-safari-8’))
    {
    setTimeout(function(){ event.data.slide.trigger(‘play’); },1);
    }
    }
    }

    function toggle( event )
    {
    if(event.target.tagName != “A”)
    {
    event.data.slide.trigger(‘toggle’);
    }
    }

    },

    /************************************************************************
    Slideshow control functions
    *************************************************************************/

    _timer: function(callback, delay, first)
    {
    var self = this, start, remaining = delay;

    self.timerId = 0;

    this.pause = function() {
    window.clearTimeout(self.timerId);
    remaining -= new Date() – start;
    };

    this.resume = function() {
    start = new Date();
    self.timerId = window.setTimeout(callback, remaining);
    };

    this.destroy = function()
    {
    window.clearTimeout(self.timerId);
    };

    this.resume(true);
    },

    //start autorotation
    _startSlideshow: function()
    {
    var self = this;

    this.isPlaying = true;

    this.slideshow = new this._timer( function()
    {
    /*
    var videoApi = self.$slides.eq(self.current).data(‘aviaVideoApi’)
    if(!videoApi){}
    */

    self._navigate( ‘next’ );

    if ( self.options.autoplay )
    {
    self._startSlideshow();
    }

    }, (this.options.interval * 1000));
    },

    //stop autorotation
    _stopSlideshow: function()
    {
    if ( this.options.autoplay ) {

    this.slideshow.destroy();
    this.isPlaying = false;
    this.options.autoplay = false;
    }
    },

    // public method: shows next image
    next : function(e)
    {
    e.preventDefault();
    this._stopSlideshow();
    this._navigate( ‘next’ );
    },

    // public method: shows previous image
    previous : function(e)
    {
    e.preventDefault();
    this._stopSlideshow();
    this._navigate( ‘prev’ );
    },

    // public method: goes to a specific image
    go2 : function( pos )
    {
    //if we didnt pass a number directly lets asume someone clicked on a link that triggered the goto transition
    if(isNaN(pos))
    {
    //in that case prevent the default link behavior and set the slide number to the links hash
    pos.preventDefault();
    pos = pos.currentTarget.hash.replace(‘#’,”);
    }

    pos -= 1;

    if( pos === this.current || pos >= this.itemsCount || pos < 0 )
    {
    return false;
    }

    this._stopSlideshow();
    this._navigate( false, pos );

    },

    // public method: starts the slideshow
    // any call to next(), previous() or goto() will stop the slideshow autoplay
    play : function()
    {
    if( !this.isPlaying )
    {
    this.isPlaying = true;

    this._navigate( ‘next’ );
    this.options.autoplay = true;
    this._startSlideshow();
    }

    },

    // public methos: pauses the slideshow
    pause : function()
    {
    if( this.isPlaying )
    {
    this.slideshow.pause();
    }
    },

    // publiccmethos: resumes the slideshow
    resume : function()
    {
    if( this.isPlaying )
    {
    this.slideshow.resume();
    }
    },

    // public methos: destroys the instance
    destroy : function( callback )
    {
    this.slideshow.destroy( callback );
    }

    }

    //simple wrapper to call the slideshow. makes sure that the slide data is not applied twice
    $.fn.aviaSlider = function( options )
    {
    return this.each(function()
    {
    var self = $.data( this, ‘aviaSlider’ );

    if(!self)
    {
    self = $.data( this, ‘aviaSlider’, new $.AviaSlider( options, this ) );
    }
    });
    }

    })( jQuery );

    Thanks again for your help!

    Michael F.

    #896641

    Topic: Hello

    in forum Enfold
    Marco
    Participant

    Hello , I tryng to make My Portfolio galleries in enfold with infinite scrolling application, could you indicate me the besth way in order to obtain this for mobile ?
    i put in private an exemple from my competitors ;-) (using mobile )
    coud you help me Please?
    Thanks

    • This topic was modified 7 years, 11 months ago by Marco.
    #876177
    Astrobiologic
    Participant

    Hello all ^^

    Im installing this plugin (Ajax Load More ) for add a load more button to blog or infinite scroll because google is penalizing me for duplicate content by repeating the text on every page of the blog pagination.

    I configurated the plugin like the screen:
    https://s7.postimg.org/62xm5s7ih/screen.png

    but it does not work at the moment. as we can see in the capture
    https://s7.postimg.org/6sgei5frv/screen2.png

    Can you help me please? I’ve been trying for a while, I’ve read all the threads of this topic in the forum but I can not find the solution, and I think it’s close. maybe you can help me.
    Thanks

    #828455

    Okay, here is some information in case anyone searching something similar finds this thread.

    I am now using Content Views Pro plugin. With it I am able to have a grid with infinite scroll/load more (see closed thread Victoria linked to) and put sharing buttons on each grid entry. It is customizable enough to cover most needs yet still seems simple and not intimidating. It can handle custom fields in grid entries so I made a custom field using ACF and put the shortcode for the enfold sharing icons into that field and it displays nicely on each grid entry and is then consistent with all other Enfold pages.

    And very importantly… It also easily allows one to create views which replace archive, author, single post etc pages. Most of the plugins and Enfold’s own grid elements, require one to edit php templates to make all those pages a consistent design. So for example, it is easy to make the category archive pages the same grid layout as the main blog grid.

    This is the first website I have built using the Content Views Pro plugin, so I cannot comment on stability and long term viability, but I am pleased to have found it and so far it is working very well. Seems about ideal for a competent non-coder like myself.

    • This reply was modified 8 years, 5 months ago by draig.
Viewing 30 results - 31 through 60 (of 167 total)