iSmith
11-14-2010, 12:21 AM
I would like to know if it is possible for me to add a leading '0' for the #nav part of the Malsup Cycle Double Pager (http://www.malsup.com/jquery/cycle/pager-double2.html) - for numbers less than 10?
The script is:
<script type="text/javascript">
$(document).ready(function() {
$('.slideshow').each(function(index) {
$(this).cycle({
fx: index ? 'fade' : 'scrollHorz',
timeout: 0,
speed: 400,
sync: false,
pager: '#nav',
prev: '#prev',
next: '#next',
pagerAnchorBuilder: function(i) {
if (index == 0)
// for first slideshow
return '<a href="#">'+(i+1)+'</a>';
// for 2nd slideshow
return '#nav a:eq('+i+')';
}
});
});
});
</script>
Also, is it possible to separate each of the #nav numbers with a space, without the need to use CSS3 word-wrap: break-word;? (so it wraps inside a DIV).
Many thanks for your help.
Ian
The script is:
<script type="text/javascript">
$(document).ready(function() {
$('.slideshow').each(function(index) {
$(this).cycle({
fx: index ? 'fade' : 'scrollHorz',
timeout: 0,
speed: 400,
sync: false,
pager: '#nav',
prev: '#prev',
next: '#next',
pagerAnchorBuilder: function(i) {
if (index == 0)
// for first slideshow
return '<a href="#">'+(i+1)+'</a>';
// for 2nd slideshow
return '#nav a:eq('+i+')';
}
});
});
});
</script>
Also, is it possible to separate each of the #nav numbers with a space, without the need to use CSS3 word-wrap: break-word;? (so it wraps inside a DIV).
Many thanks for your help.
Ian