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 4087346
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:50:37+00:00 2026-05-20T18:50:37+00:00

http://jquery.malsup.com/cycle/pager7.html shows a way to use image thumbnail as pager. I would like to

  • 0

http://jquery.malsup.com/cycle/pager7.html shows a way to use image thumbnail as pager.

I would like to add some text description to each image and still use thumbnail as pager. So I need to add a DIV to wrap the image, and also put a P inside the DIV. Can you tell me how to get the image SRC?

In short,

<img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" /><

becomes:

<div><img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" /><p>image description</p></div>

Thanks,

Back to codes, here is the original HTML

    <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>JQuery Cycle Plugin - 'updateActivePagerLink' Demo</title>
<link rel="stylesheet" type="text/css" media="screen" href="../jq.css" />
<link rel="stylesheet" type="text/css" media="screen" href="cycle.css" />
<style type="text/css">
#slideshow { margin: 20px }
#nav { width: 300px; margin: 15px; float: left }
#nav li { width: 52px; float: left; margin: 2px; list-style: none; padding: 6px; display: block }
#nav a { width: 50px; padding: 0px; display: block; border: 1px solid #ccc; }
#nav li.activeLI { background: #ff8 }
#nav a:focus { outline: none; }
#nav img { border: none; display: block }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">></script>
<script type="text/javascript" src="http://malsup.github.com/chili-1.7.pack.js"></script>
<script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.72.js"></script>
<script type="text/javascript">
// redefine Cycle's updateActivePagerLink function
$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
    $(pager).find('li').removeClass('activeLI')
        .filter('li:eq('+currSlideIndex+')').addClass('activeLI');
};

$(function() {
    $('#slideshow').cycle({
        timeout: 1000,
        pager:  '#nav',
        pagerAnchorBuilder: function(idx, slide) {
            return '<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';
        }
    });
});
</script>
</head>
<body>


<div id="demos">
    <table cellspacing="20">
    <tr><td><ul id="nav"></ul></td>
    <td>
        <div id="slideshow" class="pics">
           <img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" />
           <img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" width="200" height="200" />
           <img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" width="200" height="200" />
           <img src="http://cloud.github.com/downloads/malsup/cycle/beach4.jpg" width="200" height="200" />
        </div>
    </td></tr>
    </table>

</div>

</body>
</html>

And here is the markup I want to have:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>JQuery Cycle Plugin - 'updateActivePagerLink' Demo</title>
<link rel="stylesheet" type="text/css" media="screen" href="../jq.css" />
<link rel="stylesheet" type="text/css" media="screen" href="cycle.css" />
<style type="text/css">
#slideshow { margin: 20px }
#nav { width: 300px; margin: 15px; float: left }
#nav li { width: 52px; float: left; margin: 2px; list-style: none; padding: 6px; display: block }
#nav a { width: 50px; padding: 0px; display: block; border: 1px solid #ccc; }
#nav li.activeLI { background: #ff8 }
#nav a:focus { outline: none; }
#nav img { border: none; display: block }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">></script>
<script type="text/javascript" src="http://malsup.github.com/chili-1.7.pack.js"></script>
<script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.72.js"></script>
<script type="text/javascript">
// redefine Cycle's updateActivePagerLink function
$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
    $(pager).find('li').removeClass('activeLI')
        .filter('li:eq('+currSlideIndex+')').addClass('activeLI');
};

$(function() {
    $('#slideshow').cycle({
        timeout: 1000,
        pager:  '#nav',
        pagerAnchorBuilder: function(idx, slide) {
            return '<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';
        }
    });
});
</script>
</head>
<body>


<div id="demos">
    <table cellspacing="20">
    <tr><td><ul id="nav"></ul></td>
    <td>
        <div id="slideshow" class="pics">
           <img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" />
           <img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" width="200" height="200" />
           <img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" width="200" height="200" />
           <img src="http://cloud.github.com/downloads/malsup/cycle/beach4.jpg" width="200" height="200" />
        </div>
    </td></tr>
    </table>

</div>

</body>
</html>
  • 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-20T18:50:38+00:00Added an answer on May 20, 2026 at 6:50 pm

    http://forum.jquery.com/topic/a-question-on-cycle-plugin

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to make a pager for my image cycling using this plugin: http://jquery.malsup.com/cycle/pager3.html
im looking for something like this: http://www.malsup.com/jquery/cycle/basic.html but made in mootools, do you know
Imagine a slideshow looks similar to this: http://malsup.com/jquery/cycle/div.html except it has only two images
I'm trying to use the jQuery Cycle plugin (http://jquery.malsup.com/cycle/) to rotate testimonials located within
http://jquery.malsup.com/cycle/ Is is possible to randomise the cycled content with the jquery jcycle plugin?
I have the Jquery Cycle Plugin ... http://jquery.malsup.com/cycle/ ... and I'm trying to figure
Using the jQuery cycle plugin: jquery.cycle.all.min.js - latest version (2.8.8) from http://malsup.com/jquery/cycle/ I'm utilizing
i am using http://malsup.com/jquery/cycle/ with jquery my code is <script> $(document).ready(function(){ $(div.hide1).fadeTo(slow, 0.13); $(div.hide1).fadeTo(slow,
I notice this problem on cycle : <script src=http://malsup.github.com/jquery.cycle.all.js></script> <div id=rotator> <div>Ciao 1</div> <div>Ciao
I'm currently using this jQuery Cycle Plugin: http://jquery.malsup.com/cycle/ And I have the following code:

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.