Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter thisebum

    (@thisebum)

    The solution was easy to find in the cycle2 API: https://jquery.malsup.com/cycle2/api/

    Simply render the HTML of the slider first and then fire:

    jQuery(“.cycle-slideshow”).cycle();

    It is very important to fire this AFTER all the HTML is rendered (it was the source of my problem)

    His Thisebum,

    You made my day…. search for the clue to trigger the slider…

    For some of you : I want to bookmark images,
    with this I can route url#image.jpg directly to the slide
    img index of that specific image…

    $("div.cycloneslider-slide").each(function(){
    					i++;
    					$(this).find('img').each(
    							function(index, element){
    								var imgurl = $(element).attr('src');
    								var patt = new RegExp(hash);
    								var res = patt.test(imgurl);
    
    								if(res==true){
    								//alert('Let\'s hit button : '+i);
    								//$('.cycle-slideshow').cycle('goto', i);
    								$(".cycle-slideshow").cycle();
    								$('.cyclonesliderslides').cycle('goto',i);
    								}
    					})

    ps hash : the #bla.jpg part of your url ?? (so need strip caps and maybe image size and jpg extensions i order to work accurate for you and your client

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Load a slider with jQuery instead of Shortcode or PHP’ is closed to new replies.