Do the 'navPager' and 'previous/next links' above the presentation?
Closed this issue · 1 comments
janstieler commented
Hi,
I´m not so proofed in jquery/javascript coding. I want the 'navPager' and 'previous/next links' above the presentation.
If I change the code from
//Add in the pager
var navPager = '<ol class="'+$presentation.options.pagerClass+'">';
for(var i = 1; i < $presentation.numSlides+1; i++) {
navPager += '<li><a href="#'+i+'">'+i+'</a></li>';
}
$presentation.append(navPager);
if($presentation.currentHash) {
$presentation.find('.'+$presentation.options.pagerClass).children(':nth-child('+$presentation.currentHash+')').addClass('current');
$presentation.count = $presentation.currentHash;
} else {
$presentation.find('.'+$presentation.options.pagerClass).children(':first-child').addClass('current');
$presentation.count = 1;
}
//Add in the previous/next links
$presentation.append('<ul class="'+$presentation.options.prevNextClass+'"><li><a href="#prev" class="prev">'+$presentation.options.prevText+'</a></li><li><a href="#next" class="next">'+$presentation.options.nextText+'</a></li>');
to
//Add in the pager
var navPager = '<ol class="'+$presentation.options.pagerClass+'">';
for(var i = 1; i < $presentation.numSlides+1; i++) {
navPager += '<li><a href="#'+i+'">'+i+'</a></li>';
}
$presentation.prepend(navPager);
if($presentation.currentHash) {
$presentation.find('.'+$presentation.options.pagerClass).children(':nth-child('+$presentation.currentHash+')').addClass('current');
$presentation.count = $presentation.currentHash;
} else {
$presentation.find('.'+$presentation.options.pagerClass).children(':first-child').addClass('current');
$presentation.count = 1;
}
//Add in the previous/next links
$presentation.prepend'<ul class="'+$presentation.options.prevNextClass+'"><li><a href="#prev" class="prev">'+$presentation.options.prevText+'</a></li><li><a href="#next" class="next">'+$presentation.options.nextText+'</a></li>');
the slides won´t work. I think the problem is that the code looks to childs.
Could you give me some help please?
davist11 commented
The easiest thing to do would be to leave the JavaScript alone and adjust the CSS position of the pager.