I have the following code when i add to the list it does not stay on the page when the browser is refreshed i am wondering is there a way around this.
<script language="javascript">
$('.example-default-value').each(function () {
var default_value = this.value;
$(this).focus(function () {
if (this.value == default_value) {
this.value = '';
}
});
$(this).blur(function () {
if (this.value == '') {
this.value = default_value;
}
});
});
function example_append() {
$('#step').append($('#example-textarea').val() + "<br />");
}
I would then like to be able to add to a list and have it stay on the list even after the page is reloaded.
Sorry but that is impossible, because when you refresh your page it will again parse your page from the server side script lets say php, and you are adding the elements simply by a clientside script javascript whose changes will be lost in your refresh..
You need to have them in your initial html…or body onload you can create those items that way they will be added your body =will be loaded..:)