the benefit of using this plugin is to keep the chain, using chainable
events instead of dropping into each loops.

On 6/12/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:


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


I through that  rather than copying the script (and sometimes forgetting
to).

one button, with a toggle script to copy and show the inline script... I was
thinking about a quick adding a little more to the chain to color the
reserved words.

since it's still in the chain, an additional few transforms will be easy.
Your method never has the text nodes in the chain, so you would have to drop
into an each to get different scripts. in the page it's just the last
script... so it doesn't really matter!


|$("#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