I understand that jquery will allow you to modify attributes with the .attr() method. There are basically two methods:
$(\'#element\').attr(\'attribute\', \'
I use this method in jQuery
jQuery('option').attr("selected", "");
or in JavaScript:
document.querySelector("option").setAttribute("selected", "");
It's just you need to pass an empty string to just set boolean attribute.