194
rated 0 times
[
196]
[
2]
/ answers: 1 / hits: 16581
/ 7 Years ago, fri, march 10, 2017, 12:00:00
I have 2 bootstrap buttons, I is a direct link to another page on the website and the other one I want to activate a javascript onclick event. I have no problem with a basic link but when adding it to a button it doesnt seem to work? I have included the code I am using with the link thats works but the button doesnt.
The code is :
<div style=margin-top:10px class=form-group>
<!-- Button -->
<div class=col-sm-12 controls>
Are you already registered?
<a href='login' button type='button' class='btn btn-block btn-success'><span class='glyphicon glyphicon-user'></span> Login</button></a>
<div class=spacing3></div>Not yet?
<button id='next' name ='next' type='button' class='btn btn-block btn-primary'>Continue</button>
</div>
</div>
<a href=# onClick=$('#loginbox').hide(); $('#1box').show()>Login here</a>
And the js for the button is
$(document).ready(function() {
$('#btn-next').on('click', function() {
$('#loginbox').hide(); $('#1box').show();
}
More From » button