You must save the select option to Storage . And also do ignoring the save on a specific name .
Code:
var selects = $("#dialog_id select"); for (var key in selects) { if (!isNaN(parseFloat(key)) && isFinite(key)) { var select = selects[key]; var nameselect = $(select).attr('name'); $(select).val(localStorage.getItem(nameselect)); } } Actually thanks to it, in the dialog all selects are taken and when option selected in it, this choice is stored in Storage . The next time you open such a window, the last choice will be the default.
So, there are select to which such functionality should not apply. These individual select have given name .
Can I somehow exclude them? I would be very grateful for the advice!
localStorage, there is only reading from it by name - Vasily Barbashev