codingtcher.com
Theme Night
Home
Login

Add attribute selected jquery

//add attribute selected jquery
$(document).on('change', 'select', function () {
            var value = $(this).val();
            $(this).find('option[value="' + value + '"]').attr("selected", "selected");
});

Related Code