I assume it is not part of the Dom, does that mean I can't targetl it?
S
Main Topics
Browse All TopicsHi
I am having issues selecting a dynamic element, can anyone offer any insight into why?
I have a simply ul which displays dynamic html generated by an onclick element in my page.
I am then trying to access these newly generated elements using normal JQ selectors but it wont work!! I have tried to provide a code sample below.
Many thanks
--s--
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If you're using jQuery >= 1.3, you can use the Live event.
Documentation is here: http://docs.jquery.com/Eve
Basically, it'll bind the function to an event of any dom entity that matches the selector, even if it's created some time later.
Business Accounts
Answer for Membership
by: ShayanOHPosted on 2009-06-05 at 09:51:18ID: 24558180
When do you use the second code segment to select the newly added element?
Does the element exist in the DOM when the javascript is executed? From the looks of the source code you've shown I guess not. Please add a little more information about this so I can give you a better response!
(Real source code, with unnecessary segments removed would be the best, so I can try and debug it)