Hello, I'm developing an open source banner server, and I encountered
a strange behaviour.

First of all the banner system uses jquery (apart from validation) to
rotate the banners, using this code:

var image_count;
var current_image=0;

$(document).ready(function(){
 image_count = $("div.img-rotate").hide().size();
 $("div.img-rotate:eq("+current_image+")").show();
 setInterval(feature_rotate,5000); //time in milliseconds
});

function feature_rotate() {
 old_image = current_image%image_count;
 new_image = ++current_image%image_count;
 $("div.img-rotate:eq(" + new_image + ")").fadeIn("slow", function() {
 $("div.img-rotate:eq(" + old_image + ")").fadeOut("slow");
 });
}

Now, everything works nice, the problem arise when a include the
banner in one of the admin pages (which has jquery validation) called
simply like this:

$(document).ready(function(){
    $("#edit").validate();
 });

The error is (firebug): $("#edit").validate is not a function

The error stops (and the validation works) if I remove the image
rotation code from above. I don't have enough knowledge to understand
this conflict, does anybody can help me?

Thanks

David

p.s. validator = http://docs.jquery.com/Plugins/Validation

Reply via email to