[Assorted-commits] SF.net SVN: assorted:[1875] sandbox/trunk/src/web
Brought to you by:
yangzhang
From: <yan...@us...> - 2014-02-22 06:18:48
|
Revision: 1875 http://sourceforge.net/p/assorted/svn/1875 Author: yangzhang Date: 2014-02-22 06:18:44 +0000 (Sat, 22 Feb 2014) Log Message: ----------- Demo effect of DOM detach/move on events Added Paths: ----------- sandbox/trunk/src/web/dom/ sandbox/trunk/src/web/dom/index.jade Added: sandbox/trunk/src/web/dom/index.jade =================================================================== --- sandbox/trunk/src/web/dom/index.jade (rev 0) +++ sandbox/trunk/src/web/dom/index.jade 2014-02-22 06:18:44 UTC (rev 1875) @@ -0,0 +1,22 @@ +doctype html +html + body + .main + p Experiment subjects + button.inline(onclick='alert()') Push me + button.normal Won't work once removed + .control + p Experiment controls + button.move Move buttons + button.remove-and-attach Remove then attach buttons + script(src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js') + :coffeescript + $('.normal').click -> alert() + $('.move').click -> + $('.inline').appendTo('.main') + $('.normal').appendTo('.main') + true + $('.remove-and-attach').click -> + $('.inline').remove().appendTo('.main') + $('.normal').remove().appendTo('.main') + true This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |