We're using Telerik.Web.UI 2008.2.826.20 and have a RadRotator on our page to cycle among 20 cartoon images. We're using the FromCode rotator type. Both our ID on the control AND our CssClass are set to "rotCartoons". Below is our JavaScript code:
Sys.Application.add_load(function(){
jQuery(function($){
var rotator = $find($(".rotCartoons").attr("id"));
$("a[href=#cartoon-previous]").click(function(e){
e.preventDefault();
rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Right);
});
$("a[href=#cartoon-next]").click(function(e){
e.preventDefault();
rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Left);
});
})
});
It basically binds jQuery click handlers to to left and right anchors. On each click, it gets the rotator in JS and calls showNext() in the correct direction. When we load the page nothing happens as expected. Once we hit either the Previous or Next button, showNext() is called in the respective direction and it slides in the next cartoon, then a few seconds later it goes again to the next, etc.. How do we prevent it from auto-rotating to the next cartoon?
Thanks in advance,
Mark
Sys.Application.add_load(function(){
jQuery(function($){
var rotator = $find($(".rotCartoons").attr("id"));
$("a[href=#cartoon-previous]").click(function(e){
e.preventDefault();
rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Right);
});
$("a[href=#cartoon-next]").click(function(e){
e.preventDefault();
rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Left);
});
})
});
It basically binds jQuery click handlers to to left and right anchors. On each click, it gets the rotator in JS and calls showNext() in the correct direction. When we load the page nothing happens as expected. Once we hit either the Previous or Next button, showNext() is called in the respective direction and it slides in the next cartoon, then a few seconds later it goes again to the next, etc.. How do we prevent it from auto-rotating to the next cartoon?
Thanks in advance,
Mark