If you add new elements (*any* new elements, not just LI's!) to a page
using core jQuery, they will only have whatever properties/events/
whatever that you assign/attach to them once they have been added to
the DOM. In other words, it's down to you to ensure that the new
elements have the required events attached to match those already
existing.

There are, however, plugins that are capable of looking after this
sort of thing for you - LiveQuery being one.

On Jun 5, 9:51 am, "xiaohc.net" <[EMAIL PROTECTED]> wrote:
> dear one,
>
> I'm from China,i have a question about jQuery.
>
> When i add some elements to page,example add some li to ul,the new li
> don't have event that initiatory li had.
>
> I means that how to reflesh the page let all li has same event when
> dom changed?
>
> sorry,My poor English skills!
>
> Chinese:
> 当DOM结构改变以后,新加入的元素怎么才能获得原来同类元素的事件?
>
> 比如页面开始时每个LI有DRAG&DROP事件,当异步AJAX添加一个LI时,怎么让这个添加的LI也有DRAG&DROP事件?

Reply via email to