JQuery Cycle plugin - pageAnchorBuilder using radio buttons
- by Josh
Hi all,
JQuery noobie here - i'm trying to make a pager using radio buttons with the JQuery Cycle pageAnchorBuilder.
The transitions all seem to work ok, except but it is not possible to select a radio button. Any help much appreciated!
Cheers
Here is my JavaScript code:
$('.products').cycle({
fx: 'scrollHorz',
speed: 300,
timeout: 0,
pager: '#nav',
pagerAnchorBuilder: function(idx, slide) {
return '#nav input:eq(' +idx +')';
}
});
HTML is here:
<ul id="nav">
<li><input type="radio" name="style" id="style1" value="Style 1" /><label for="style1">Style 1</label></li>
<li><input type="radio" name="style" id="style2" value="Style 2" /><label for="style2">Style 2</label></li>
<li><input type="radio" name="style" id="style3" value="Style 3" /><label for="style3">Style 3</label></li>
</ul>