HighDots Forums  

renameNode con jQuery?

Javascript (Italian) Il linguaggio JavaScript (it.comp.lang.javascript)


Discuss renameNode con jQuery? in the Javascript (Italian) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Manlio Perillo
 
Posts: n/a

Default renameNode con jQuery? - 02-09-2008 , 09:01 AM






Saluti.


Ho questo frammento XHTML:

<div>
<p id="uno">...</p>
<p id="due">...</p>
</div>


Tramite JavaScript vorrei rimpiazzare #due con un nuovo elemento.

DOM3 ha un metodo renameNode, come lo posso simulare con jQuery?

Sembra che facendo:
1) $('#due').after(elem)
2) $('#due').remove()

funzioni, ma vorrei una conferma.



Grazie Manlio Perillo

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.