What is the JavaScript equivalent of jQuery's hide() and show()?
this is simple
document.getElementById('myElement').style.display = 'block'; // show
document.getElementById('myElement').style.display = 'none'; // hide
add a onSelect="selectOptionsupdated(this)
in your select
then
function selectOptionsupdated(select){
//do your stuff here
}
var myButton = document.getElementById('myButton');
//hide
myButton.style.display = 'none';
//show
myButton.style.display = 'block';
Update for your select tag..try this
html
<select id="list">
<option id="1">Science</option>
</select>
js
var list = document.getElementById('select');
list.addEventListener('change', listSelect, false);
function listSelect(){
var selected = list.options[list.selectedIndex].value;//Selected option value //hide
myButton.style.display = 'none';
//show
myButton.style.display = 'block';
}