I tried:
but it didn
Some options:
$('.mycurrentclass').remove();
$('.mycurrentclass').detach();// see below for possible use
$('.mycurrentclass').css({display:'none'});
$('.mycurrentclass').hide();
$('.mycurrentclass').toggleClass('myhiddenclass');
$('.mycurrentclass').addClass("myhiddenclass");
$("myselector").toggle(
function () {
$(this).addClass("myhiddenclass");
},
function () {
$(this).removeClass("myhiddenclass");
}
);
// programtic like you seem to want:(first part puts it back, else detaches it)
var p;
if ( p )
{
p.appendTo("mywheretoappenditselector");
p = null;
}
else
{
p = $("myselector").detach();
};