function rotateimg(ulid,showid,linkid) {
var cur = $("#"+ulid+" li.current");
var nxt = cur.next("li");
if (nxt.length == 0)
{
nxt = $("#"+ulid+" li:first");
}
cur.removeClass("current");
nxt.addClass("current");
var img_value=nxt.attr("id").substring(11);
var img_title=nxt.attr("title");
var img_id = nxt.attr("name").substring(17);
var alink=nxt.attr("rel");
$("#"+linkid).attr("href",alink);
$("#"+ulid+" li div").css("background-color", "#000000");
nxt.find("div").css("background-color", "#333333");
setimg(img_value,showid,img_title);
}
var lt=setInterval("rotateimg('lnews','show_images_event','lnewslink')", 5000);
in this code. i am getting this error nxt.attr("id") is undefined
pls any one help me