Solved

Jquery cycle plugin option usage

Posted on 2010-08-26
2
600 Views
Last Modified: 2013-11-11
Hi
I am using the following Jquery plugin:
http://jquery.malsup.com/cycle/options.html.
I have four links which I want to link to the four different 'slides', so when a user clicks number 2 link it shows number 2 slide.
I suspect one of these options may do it, but there are others:
pager:           null,  // selector for element to use as pager container 
pagerClick:      null,  // callback fn for pager clicks:    function(zeroBasedSlideIndex, slideElement) 

Open in new window


Can anyone suggest what I may do?

Regards
John

0
Comment
Question by:jdav357
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
dirknibleck earned 500 total points
ID: 33543346
According to http://jquery.malsup.com/cycle/goto.html, you just call .cycle() with an index number to go directly to a slide, so on click for your links, you will call $(elem).cycle(i) where i is the index of the image you want to display.
0
 
LVL 42

Expert Comment

by:David S.
ID: 33544901
There's an example of using the pager option on this page: http://jquery.malsup.com/cycle/int2.html

And as Dirk said, you could also construct your own.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Geolocation works...sometimes 2 40
How can I do this in Angular, instead of jQuery? 2 23
Changing the format from a text box to a drop-down menu 9 37
Javascript question 8 44
There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question