localStorage set and remove with a function
localStorage HTML5 - JQuery example.
HTML
<div></div>
JavaScript
if (!localStorage.icns){
localStorage.setItem("icns", "on");
$("div").html("Your Local Storage is Set");
fff()
}else{
$("div").html("done");
localStorage.removeItem("icns")
}
function fff(){ alert("you just called a function too :)")}