I have this design. and what I'm trying to do is that the ones that are selected to keep them disabled in the localStorage And that when the page is refreshed or closed and opened again they remain disabled.
$(function() {
$('.asignarConteo').on('click', function(e) {
$('.widthSelect :selected[value!="0"]').closest("tr").each(function() {
//console.log(
// $(this).find(".iarticulo").text(),
console.log($(this).find(":selected").val());
var ar = $(this).find(".iarticulo").text();
var usu = $(this).find(":selected").text();
$.ajax({
url: 'http://localhost:3000/AsigUsuarios',
method: 'post',
//persist: true,
//cache: true,
data: { idArticulo: ar, Usuario: usu },
success: function(res) {
console.log(res);
console.log('Entro');
$(".widthSelect").filter(function() {
return this.selectedIndex > 0;
}).prop('disabled', true);
//SaveLocalStorage
}
});
})
});
});