JQuery Cycle $(this) into pager property
There are 3 similar cycle-slideshow with images-pager, but I don`t know write pager property, I need to pager will be into parent
- $(.slider).cycle({
- pager: $(this).find("div.slider-nav")
- });
I am editing plugin.
- in buildOptions(...){
- buildPager($cont, els,opts);
- .../////
- function buildPager($cont, els, opts) {
var $p = $(opts.pager);
var parent = $cont.parents(opts.parent);
if(opts.pagerSet != undefined && opts.pagerSet == "inner"){
$p = $(parent).find(opts.pager);
}
- ////////.....
use:
- $(".img-holder").after('<div class="slider-nav"><ul>')
$('.img-holder-c div.slide').cycle({
fx: 'fade',
speed: 'slow',
timeout: 0,
pager: "div.slider-nav ul",
pagerSet: "inner",
parent: ".gallery-holder",
pagerAnchorBuilder: function(idx, slide) {
var parent = $(slide).parents($('.img-holder-c div.slide'));
return "<li class='holder-top'><div class='holder-bottom'><div class='holder-c'><a href='#'><img src='" + slide.src + "' width='50' height='50' /></a></div></div></li>"}
});