[jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread George Adamson
or if myElement has no siblings then I can use .parent().html(...). Any thoughts? Am I missing something?! Cheers George -- View this message in context: http://www.nabble.com/What-is-the-best-way-to-replace-an-element-using-JQuery--tf3148907.html#a8729470 Sent from the JQuery mailing list archive

Re: [jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread Alexandre Plennevaux
I would try: $(#myElement).before( divnew element/div).remove(); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of George Adamson Sent: mercredi 31 janvier 2007 15:02 To: discuss@jquery.com Subject: [jQuery] What is the best way to replace an element

Re: [jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread Shane Graber - jQuery
no siblings then I can use .parent().html(...). Any thoughts? Am I missing something?! Cheers George -- View this message in context: http://www.nabble.com/What-is-the-best-way-to-replace-an-element-using-JQuery--tf3148907.html#a8729470 Sent from the JQuery mailing list archive

Re: [jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread Brandon Aaron
-- View this message in context: http://www.nabble.com/What-is-the-best-way-to-replace-an-element-using-JQuery--tf3148907.html#a8729470 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com

Re: [jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread Andreas Wahlin
in context: http://www.nabble.com/What-is-the- best-way-to-replace-an-element-using-JQuery--tf3148907.html#a8729470 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss

Re: [jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread George Adamson
this message in context: http://www.nabble.com/What-is-the-best-way-to-replace-an-element-using-JQuery--tf3148907.html#a8729470 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss

Re: [jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread Alexandre Plennevaux
... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of George Adamson Sent: mercredi 31 janvier 2007 18:14 To: discuss@jquery.com Subject: Re: [jQuery] What is the best way to replace an element using JQuery? Thanks for all your replies. Looks like everyone settled

Re: [jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread Mike Alsup
Yep, a replace() function would be nice. Here you go, world's smallest plugin: $.fn.replace = function(o) { return this.after(o).remove(); }; ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/