[jQuery] Re: how to get back the DOM element as HTML source

2009-08-26 Thread John
Cool. Thanks. -John On Aug 21, 9:49 am, KeeganWatkins wrote: > i wrote a really simple plugin for this, as i frequently have the same > use case: > > jQuery.fn.outerHTML = function() { >     return jQuery("").append( jQuery(this[0]).clone() ).html(); > > } > > so that i could call it on any ele

[jQuery] Re: how to get back the DOM element as HTML source

2009-08-21 Thread KeeganWatkins
i wrote a really simple plugin for this, as i frequently have the same use case: jQuery.fn.outerHTML = function() { return jQuery("").append( jQuery(this[0]).clone() ).html(); } so that i could call it on any element, such as: $("#fooID").outerHTML(); On Aug 19, 9:55 am, John wrote: > Tha

[jQuery] Re: how to get back the DOM element as HTML source

2009-08-19 Thread John
That works. Really appreciate your help. -John On Aug 18, 7:48 pm, mkmanning wrote: > outerHTML is an IE addition to the DOM and not supported by Firefox. > If you want to get it with jQuery just append the element to a div and > get itshtml(): > > $('').append( $("table:first").clone() ).html()

[jQuery] Re: how to get back the DOM element as HTML source

2009-08-18 Thread mkmanning
outerHTML is an IE addition to the DOM and not supported by Firefox. If you want to get it with jQuery just append the element to a div and get its html(): $('').append( $("table:first").clone() ).html() On Aug 18, 4:37 pm, Jules wrote: > Use DHTML property. > > $("table:first")[0].outerHTML >

[jQuery] Re: how to get back the DOM element as HTML source

2009-08-18 Thread Jules
Use DHTML property. $("table:first")[0].outerHTML On Aug 19, 12:36 am, John wrote: > Thanks, Anurag. Let me rephrase my question. For example, I can use > the following jQuery > to get the html source of a table element > > $("table:first").html() > > The returned html source does not include t

[jQuery] Re: how to get back the DOM element as HTML source

2009-08-18 Thread John
Thanks, Anurag. Let me rephrase my question. For example, I can use the following jQuery to get the html source of a table element $("table:first").html() The returned html source does not include the table itself, I like to see the html source starting from the table, for example, .. Is

[jQuery] Re: how to get back the DOM element as HTML source

2009-08-17 Thread anurag pal
Hi John, After setting the html by using html method you have to bind the DOM elements using bind method. Example: $(".pge").bind("click", function(e){ var options = {}; $.ajax({ url: "data_retrieval.php", cache: false,