On Thu, Aug 20, 2009 at 6:45 AM, Audrey A Lee<[email protected]> wrote:
> I am looking for a demo of putting an a-element inside a div-element.
>
> $("a#aInDiv99").click(function(event){alert("hello world");});
>
> The click event does not fire when I click 'aInDiv99'

This does not belong on the jquery-ui list, as it doesn't have to do
with the UI framework, but with jQuery itself.

That said, your code looks as though it should work.  Perhaps you are
not running it in the right order?  If you call that line before
you've created the element, then jQuery won't find the element.  Here
are two approaches that might help:

    http://jsbin.com/idava/edit
    http://jsbin.com/exuto/edit

  -- Scott

--~--~---------~--~----~------------~-------~--~----~
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