views:

45

answers:

1

Hi, I have a tabbed nav and I am creating/removing elements based on tab clicks. I am using the live() (since elements are dynamically created) with remove(). tab1 adds elements and tab2 deletes few of them. adding works well but delete does not delete those dynamically created elements. Any thoughts around this? If I need to post the code, i will.

Thanks, Racky

A: 

If you could post the code that would be extremely helpful.

How is your second tab selecting the new elements? .closest() and .find() are you best friends, closest() transverses up the DOM until it finds your selection and find() travels down. Try siblings if they share the same parent :) Otherwise, I'll wait until you post the code to speculate further.

John Strickler
Hey thanks for your suggestions. I figured it out myself since that was an error from my side. Please see the comment above...Thanks,Racky
racky