I attempted to use some javascript to manipulate the attributes of an html tag, but I am not getting the results that I expect. The attribute remains on the element, despite there being nothing wrong with my javascript.
Specifically, I tried using the following javascript to remove the 'style' attribute from this tag:
<select tabindex="-1" class="selectized" style="display: none;">
The javascript below looks a little funny because it sits inside of an r-markdown document.
function doStuff() {
document.getElementById('tab').getElementsByClassName('selectized').removeAttribute('style');
}$(document).ready(doStuff)
Here is the important html bit (I could not copy and paste (I apologize), so I took a picture).