apply plugin to a new element in the DOM (jquery)

后端 未结 4 759
故里飘歌
故里飘歌 2020-12-12 01:23

I am using the jquery tablesorter plugin and applies it to a table with id : #table

my search facility requests for results via ajax and replaces the table with a ne

4条回答
  •  有刺的猬
    2020-12-12 01:49

    expanding on what Q8-coder said, anything you insert into the dom (even if it was there before) usually must be rebound to any event handlers and functions.

    supposedly jQuery's made (or is making) a deep clone of DOM Nodes including the event handlers as well. this would be cool, because it solves this problem.

提交回复
热议问题