I use .hide to hide html contents bysliding left.
but i have a doubt about hidden contents ! Can i remove those html content like .empty function while using .hide function because i heard .empty function removes html contents forever(permanently) so browser will not try to crash or stuck and i heard .hide function just hides the html contents so still there is a chance of crashing the browser or stuck the browser if i load something else via AJAX.
Any solution for this? can i remove those html content permanently like .empty function while using .hide function ?
$(".more").click(function () {
$('#ss').hide("slide", { direction: "left" }, 10000);
});
Try using the .remove() method and assigning it to a variable like this:
var $element = $(‘#ss’).remove();
The .remove() method returns the element that was removed, so when you assign it to a variable you can easily add it back in later.