Currently have problem when I produce html using a javascript. Below is my code:
html:
<div id="result"></div>
javascript:
var html = '';
for(var i=0; i < 2; i++){
html += '<button onclick="#" class="btn btn-default kiosk_btn">button</button>'
}
$( "#result" ).html( html );
css:
.kiosk_btn{font-size: 4vmin; background-color: #141E26; border:none; box-shadow: 5px 5px 5px black; margin: 2vmin; height:8vmin; width:80vmin; color:white;}
.kiosk_btn:active{outline: none; text-decoration: none;}
.kiosk_btn:focus{outline: none; text-decoration: none; }
.kiosk_btn:hover{text-decoration: none; background-color: #213140; color:white;}
I'm using the bootstrap buttons. The buttons will become white after pressing it. It is supposed to go back to original color after pressing it.
If I straightaway write the button as html coding instead of using javascript, it will not have such problem. Do you guys have any ideas how to solve this?