jQuery Cycle - how do I edit (remove) text for a slideshow button
I'll start by saying I'm not an expert js programmer by any stretch of the imagination!
I am trying to adapt the addSlide demo 5 (http://jquery.malsup.com/cycle/add5.html) but instead of using buttons created by css I wish to use images.
So I'm largely okay with that, have found the #nav container and defined my background-image images but these are overwritten by textual digits and I'm not sure where these are generated from. Most likely something in my main.js file though I can't figure out what exactly. I'm using cycle as follows:
- $(function() {
var stack = [];
// preload images into an array
for (var i = 3; i < 5; i++) {
var img = new Image(959,316);
img.src = 'images/nomos' + i + '.jpg';
stack.push(img);
}
$("#slideshow").cycle({
timeout: 5000,
speed: 600,
fx: 'fade',
pager: '#nav',
before: onBefore
});
// add images to slideshow
function onBefore(curr, next, opts) {
if (opts.addSlide) // <-- important!
while(stack.length)
opts.addSlide(stack.shift());
};
});
My css is like this:
- td a {
margin: 5px
}
#nav {
padding: 0
}
#nav a {
margin: 0 5px;
padding: 3px 5px;
border: 1px solid #ccc;
border: 0;
background: #000;
background-image: url('../images/slidebutton.jpg');
text-decoration: none }
#nav a.activeSlide {
background: #000;
background-image: url('../images/slidebutton-current.jpg');
}
#nav a:focus {
outline: none;
}
#main {
margin: 20px
}
And the demo site is here: http://www.hardingweb.net/nomos-tax/
How do I remove the digits that overwite my buttons?
Thanks
Nigel Harding