JQuery rebind after using html() -


I am using JQuery. HTML () Use this code to swap around the page on your page:

  $ ('# item1'). Html ($ ('# item8') .HTML ()); $ ('# Item8') HTML ('& Lt; p & gt; sdsdsd & lt; / p & gt;');   

I've found that it works great, however, if jQuery functions stop working then there will be a toggle for example in div # item1, as long as I am .html (), By then it will work fine.

Is there a solution to reboot JQuery to solve it?

Thank you! Instead of retaining the HTML of the elements, instead of reparse it in any other element, instead of retaining the HTML of the elements, you

  var $ item8 = $ ('# item8'); .. $ ('# ITEM1') below () enclosed ($ item8.contents ()); $ Item8.html ('<< gt; sdsdsd & lt; / p & gt;');   

This will keep any existing binding on the elements already created, so there is no need to use live or those events There is no need to reboot.

Live () , or rather, representative () is still a decent alternative solution, though.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -