Guest User

Untitled

a guest
Jan 18th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. <div id="main">
  2. <div id="foo1">Foo1</div>
  3. <div id="foo2">Foo2</div>
  4. <div id="foo3">Foo3</div>
  5. <div id="foo4">Foo4</div>
  6. </div>
  7.  
  8. $('#foo1').replaceWith($('#foo5'))​
  9.  
  10. $('#foo1').replaceWith('<div id="foo5">Content</div>')​
  11.  
  12. $('#foo1').replaceWith('<div id="foo5">Foo4</div>');​
Add Comment
Please, Sign In to add comment