$(this) in .live("click")-function vs. opera
Hi,
I'm trying to dynamically append DIVs with jQuery that I want to make clickable with jQuery's .live()-function. Appendings DIVs and binding the click works great, but in Opera I get a wierd error when I actually perform the click:
The code is simple:
-
$("#files_to_upload .file_upload").live("click", function() {
self = $(this);
if(self.hasClass("selected")) {
self.removeClass("selected");
[...]
} else {
self.addClass("selected");
}
return false;
});
Thanks for help
Luke