views:

88

answers:

0

I am creating a simple jQuery widget and have the following two lines in the _init() method.

this.element.find("li.thumb img").css("cursor", "pointer");
this.element.find("li.thumb img").live("click", function() { alert(); });

The addition of the style property in the first line works in both IE7 and FF3. However, the binding of the event in the second line only works in IE7, not in FF3.

Elements are dynamically added to the widget so I need to use the .live() method. I know I could combine these two lines, I'm just trying to get the basics working.

Any thoughts on why this may be occurring?

Thanks