I have defined a function and calling it recursive and its not working here is the code
$(document).ready(function () {
//if i remove the slider call here it doesn't even run the function slider
slider();
function slider() {
$("#img2").fadeOut(3000, function () {
$("#img2").fadeIn(3000);
});
//recursive call
slider();
}
});