$( function() {
$('#sticky-edit').bind( 'taphold', function( e ) {
alert( 'You tapped and held!' );
var thetext = localStorage.getItem("sticky");
$(".sticky-text").html('<input id="sticky-input" type="text" value="'+thetext+'" />');
} );
$('#sticky-submit').bind( 'taphold', function( e ) {
var data = $("#sticky-input").val();
alert('Notes Saved!');
localStorage.setItem("sticky", data);
$(".sticky-text").text(localStorage.getItem("sticky")).show();
} );
} );
$(".sticky-text").text(localStorage.getItem("sticky")).show();
#stickies li {
position: relative;
width: 200px;
min-height: 100px;
margin: 25px auto;
padding: 15px;
background: #f1f3a2;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(247,247,210,1)), to(rgba(240,242,155,1)));
background: -moz-linear-gradient(top, rgba(247,247,210,1), rgba(240,242,155,1));
-webkit-box-shadow: 0 2px 12px rgba(0,0,0,.5);
-moz-box-shadow: 0 2px 12px (rgba(0,0,0.5));
box-shadow: 0 1px 2px #000;
-webkit-transform: rotate(-.5deg);
-moz-transform: rotate(-.5deg);
-o-transform: rotate(-.5deg);
text-align: center;
color: #000;
text-shadow: white 1px 1px 0px;
list-style: none;
}
#stickies li:nth-child(even) {
-webkit-transform: rotate(.5deg);
-moz-transform: rotate(.5deg);
-o-transform: rotate(.5deg);
}
#stickies li::before {
content: ' ';
display: block;
position: absolute;
left: 65px;
top: -15px;
width: 75px;
height: 25px;
z-index: 2;
background-color: rgba(243,245,228,0.5);
border: 2px solid rgba(255,255,255,0.5);
-webkit-box-shadow: 0 0 5px #888;
-moz-box-shadow: 0 0 5px #888;
box-shadow: 2px 2px 2px #000;
-webkit-transform: rotate(-3deg);
-moz-transform: rotate(-3deg);
-o-transform: rotate(-3deg);
}
#stickies li:nth-child(even)::before {
-webkit-transform: rotate(3deg);
-moz-transform: rotate(3deg);
-o-transform: rotate(3deg);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul id="stickies">
<li>
<p class="sticky-text">Hello</p>
<a id="sticky-edit">Edit</a>
<a id="sticky-submit">Submit</a>
</li>
</ul>