Ⓙⓐⓚⓔ wrote:
a new, and I think very useful function, match()
I find that last one quite interesting:

|$("#showScript").toggle(
        
function(){$("script:last").clone().textNodes().wrap("<code/>").parent().appendTo("body")}
        ,function(){$("code").remove()}
);
|

Could you explain a bit what is actually happening there? Without textNodes I would do something like this:

var script = $("<code>").html( $("script:last").html() 
).hide().appendTo("body");
on click: script.show();

--
Jörn Zaefferer

http://bassistance.de

Reply via email to