Permalink
Browse files

added: custom pager support

  • Loading branch information...
jacksbox committed Aug 20, 2013
1 parent 4bd1675 commit c345600adc98504b18f70472f6b5ecb044c78d97
Showing with 12 additions and 6 deletions.
  1. +4 −2 example/css/fractionslider.css
  2. +8 −4 jquery.fractionslider.js
@@ -77,12 +77,14 @@
z-index:9999;
}
.fs-pager-wrapper a{
.fs-pager-wrapper a,
.fs-custom-pager-wrapper a{
display:inline-block;
width:14px; height:14px;
margin:0 5px 0 0;
background:url(images/fs.pager.png) 0px -14px no-repeat transparent;
}
.fs-pager-wrapper .active{
.fs-pager-wrapper .active,
.fs-custom-pager-wrapper .active{
background:url(images/fs.pager.png) 0px 0px no-repeat transparent;
}
@@ -173,10 +173,14 @@
});
}
// pager
if (options.pager) {
pager = $('<div class="fs-pager-wrapper"></div>');
slider.append(pager);
var customPager = (typeof options.pager !== 'boolean');
pager = (customPager) ? options.pager : $('<div class="fs-pager-wrapper"></div>');
if (!customPager) {
slider.append(pager);
}else{
pager.addClass('fs-custom-pager-wrapper');
}
}
slider.children('.slide').each(function(index) {
@@ -185,7 +189,7 @@
slide.children('[data-fixed]').addClass('fs_fixed_obj');
// pager again
if (options.pager) {
if (options.pager || customPager) {
var tempObj = $('<a rel="' + index + '" href="#"></a>').bind('click', function() {
return pagerPressed(this);
});

0 comments on commit c345600

Please sign in to comment.