С помощью плагина, который я включил, вы можете получать и устанавливать куки.
Ваш код будет выглядеть примерно так:
//checks if the cookie has been set
if($.cookie('remember_select') != null) {
// set the option to selected that corresponds to what the cookie is set to
$('.select_class option[value="' + $.cookie('remember_select') + '"]').attr('selected', 'selected');
}
// when a new option is selected this is triggered
$('.select_class').change(function() {
// new cookie is set when the option is changed
$.cookie('remember_select', $('.select_class option:selected').val(), { expires: 90, path: '/'});
});
Вот как бы вы select
выглядели:
<select class="select_class">
<option value="1">Row 1</option>
<option value="2">Row 2</option>
<option value="3">Row 3</option>
</select>
Вот демонстрация этого на jsFiddle: http://jsfiddle.net/RastaLulz/3HxCF/3/
Вот плагин cookie jQuery, если у вас его еще нет: http://pastebin.com/CBueT8LP