Dynamic click event handlers
I'm working on a site that has a custom "coda slider" type navigation. Basically all "pages" are on a horizontal line and there's a frame so you only see one at a time. I have "< Prev" and "Next >" buttons on the bottom and when you click them, they slide the horiz line over to the right spot. So the Prev/Next buttons have dynamic click handlers. My horiz frames scroll very smoothly in Chrome and IE7 (ha) but they're grindingly messed up in Firefox. By grindingly messed up, I mean they barely show any motion at all. I'm not sure if this has to do with my click event handlers or not. Here's my code to bind the clicks:
-
jQuery(".NextBtn").click(function(){
if(pos < (cellCount-1)){
curLeft = curLeft - cellWidth;
jQuery(".CellList").animate({left: curLeft + "px"}, 500 );
pos++;
}
//check hover box status
showHideHoverBox();
return false;
});
jQuery(".PrevBtn").click(function(){
if(pos > 0){
curLeft = curLeft - (-cellWidth);
jQuery(".CellList").animate({left: curLeft + "px"}, 500 );
pos--;
}
//check hover box status
showHideHoverBox();
return false;
});
Do I need to unbind anything first? I have other click bindings elsewhere for other stuff too. Could that be causing any problems?