/ Published in: JavaScript
Expand |
Embed | Plain Text
//In the below example $("p").click(function(){ $(this).toggleClass("off"); }); var p; $("button").click(function(){ if ( p ) { p.appendTo("body"); p = null; } else { p = $("p").detach(); } });
You need to login to post a comment.
