Hello,

I've been working with jQuery about 20 hours now.

I like it.

I am looking for a demo of putting an a-element inside a div-element.

This seems to work:

  $("#div99")[0].innerHTML = "<a id='aInDiv99' href='#'>I am in div99</
a>";

I'd like to handle its click-event.

I wrote this:

$("a#aInDiv99").click(function(event){alert("hello world");});

The click event does not fire when I click 'aInDiv99'

Is there a recipe for writing a click-event-handler for dynamically
created a-elements?

Oh, here is my world:
  - jquery-1.3.2.js
  - Safari 4.0.3
  - Firefox 3.5.2

-Audrey

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to