Hi I have a page with a select list a follows
<select class="othdebt" id="othdebt" name="othdebt">
<option value="Cate" >Categorical</option>
<option value="Cont">Continuous</option>
<option value="Data">Date</option>
</select>
When I go to some other page and came back to the select list page then I want to see the same selected option.
I use the following jQuery to do this.
<script type="text/javascript">
$(".othdebt").each(function(){
var $titleId = $(this).attr('id');
var $cookieValue = $.cookies.get($titleId);
if ($cookieValue) {
$(this).val($cookieValue);
}
});
</script>
But it is not working any other suggestion to do this?
Finnally i found the solution for myself
here is the
DEMO