// find elements
var banner = $("#banner-message")
var button = $("button")
// handle click and add class
button.on("click", function(){
var optshtml = "";
for (var i=0;i<10000;i++){
optshtml +="<option value='"+i+"'>"+i+"</option>";
}
$("#sel").html(optshtml);
})
<div id="banner-message">
<select id='sel' style='width:50px'>
</select>
<button>Change color</button>
</div>