Answers for "set selected attribute jquery"

0

selected option attribute jquery

$('#location').find('option:selected').attr('myTag');
Posted by: Guest on August-28-2020
0

add attribute selected jquery

$(document).on('change', 'select', function () {
            var value = $(this).val();
            $(this).find('option[value="' + value + '"]').attr("selected", "selected");
        })
Posted by: Guest on December-26-2021

Code answers related to "set selected attribute jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language