
Originally Posted by
WavyDavy
How would I achieve this? with a conditional statement?
No, by understanding what the code is doing.
Here's what you currently have:
Code:
$(function () {
// pager handler, create tabs
});
$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
...
};
$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
...
};
$(function() {
// init cycle
});
The parts in the $(function() { sections are inside callback functions, which are delayed until the page exists, which is required for those parts of the code to run properly.
However, you also have updateActivePagerLink being defined twice. The first one will just be overwritten by the second, so you should completely remove that first one.
What is normally done is for all of the jQuery code to be placed inside a single callback function, so what you need to have instead with your code is this:
Code:
$(function () {
... pagerHandler
... create tabs
$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
...
};
... init cycle code
});
After that, you need to add the CSS code so that you can see the effect that the activeLI is having on the numbered links, and to then reorganise the structure of that pager to fix a problem that the prev/next links are causing.
Bookmarks