Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 553085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:34:06+00:00 2026-05-13T11:34:06+00:00

I have successfully installed the Cycle plugin for Jquery and have my banners cycling

  • 0

I have successfully installed the Cycle plugin for Jquery and have my banners cycling the way I want them. My question is around building the anchors. I am trying to build something similar to http://www.bazaarvoice.com.

Seems like the anchors are being generated from the javascript but I could be wrong. Here is my html and javascript.

HTML

<div id="slideshow">
        <ul class="pager">
            <!-- will be populated with thumbs by JS -->
        </ul>
        <!-- each div is considered as a slide show -->
        <div><img src="/images/banner1.png" />You can place text here too !</div>
        <div><img src="/images/banner2.png" />and here</div>
        <div><img src="/images/banner3.png" />and even here</div>
    </div><!-- close #slideshow -->
<div id="tabs"></div>

Javascript

$("#slideshow").cycle({ 
    fx:           'fade',  // name of transition effect (or comma separated names, ex: fade,scrollUp,shuffle) 
    timeout:       5000,   // milliseconds between slide transitions (0 to disable auto advance) 
    speed:         400,    // speed of the transition (any valid fx speed value) 
    pager:         "#tabs",// selector for element to use as pager container 
    pagerClick:    null,  // callback fn for pager clicks:  function(zeroBasedSlideIndex, slideElement) 
    pagerEvent:   'hover',// name of event which drives the pager navigation 
    pagerAnchorBuilder: function(i, slide){// callback fn for building anchor links:  function(index, DOMelement) 
        return '<li class="thumb" id="thumb-1"><img src="' + slide.src + '" height="30" width="40" /></a></li>';
    },
    before: function(){ // deselect all slides
        $(".thumb").removeClass('selected');
    },
    after: function(foo, bar, opts){ // select current slide
        $("#thumb-"+opts.currSlide).addClass('selected');
    }, 
    fit:           1,     // force slides to fit container 
    pause:         1,     // true to enable "pause on hover" 
    pauseOnPagerHover: 1, // stop slideshow when pagers are being hovered
    autostop:      0,     // true to end slideshow after X transitions (where X == slide count) 
    autostopCount: 0,     // number of transitions (optionally used with autostop to define X)  
    slideExpr:     "div", // all content of div#slider is a slide. but not the pager
    fastOnEvent:   100,   // force fast transitions when triggered manually (via pager or prev/next); value == time in ms 
});

Seems like it would be in the pagerAnchorBuilder but not sure.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:34:06+00:00Added an answer on May 13, 2026 at 11:34 am

    looks like you are missing the beginning anchor tag

    pagerAnchorBuilder: function(i, slide){// callback fn for building anchor links:  function(index, DOMelement) 
        return '<li class="thumb" id="thumb-1"><img src="' + slide.src + '" height="30" width="40" /></a></li>';
    },
    

    right between the <li> and the <img> it should be. seems you have the end tage there already though. the correct way should look something like this:

    pagerAnchorBuilder: function(i, slide){// callback fn for building anchor links:  function(index, DOMelement) 
        return '<li class="thumb" id="thumb-1"><a href="path-to-link"><img src="' + slide.src + '" height="30" width="40" /></a></li>';
    },
    

    if you want to change the link based on the ID of the slide, you may want something like this:

    pagerAnchorBuilder: function(i, slide){// callback fn for building anchor links:  function(index, DOMelement) 
        switch(slide.attr("id")){
            case "one": return '<li class="thumb" id="thumb-1"><a href="path-to-first-link"><img src="' + slide.src + '" height="30" width="40" /></a></li>';
            case "two": return '<li class="thumb" id="thumb-1"><a href="path-to-second-link"><img src="' + slide.src + '" height="30" width="40" /></a></li>';
            case "three": return '<li class="thumb" id="thumb-1"><a href="path-to-third-link"><img src="' + slide.src + '" height="30" width="40" /></a></li>';
        }
    
    
    },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the Jquery Cycle Plugin ... http://jquery.malsup.com/cycle/ ... and I'm trying to figure
I have successfully installed & configured the M2E Maven plugin for Eclipse, along with
I have successfully installed following items as i want to Integrate Facebook Chat Into
I have successfully installed: 1) IntelliJ IDEA 10.0.3 with Lua Plugin 2) Corona SDK
I have successfully installed jquery-rails in my rails 3 test app. I already had
I have successfully installed Oracle 11g R2 version. I don't have good knowledge about
I have just successfully installed CakePHP and I see that I can edit the
I am trying to install the InnoDb plugin for mysql 5.1.61, I have successfully
I have successfully installed the Clearance Gem from ThoughtBot. Clearance sends a confirmation email
I have successfully installed SVN on a Windows XP machine and can connect to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.