Hi - I'm making a slider and this is the meat of my code;
$('#slider a').click(function () {
elem.filter(this.hash).addClass("active").animate({"right":"0"}, 3000,
function() {
elem.filter(activeElem).removeClass("active");
activeElem = elem.filter(this.hash);
});
I'm trying to remove the class "active" from the existing viewable element, then adding "active" to the new element. Yet, when I run it, I get a an error in Firebug sayed, "b is undefined" and in IE that "nodeType is null or not an object".
Can you not set variables in a callback function?