jQuery to hide dummy button and show submit button -


i have js (jquery):

<script type="text/javascript">         if ($('input.checkbox_check').is(':checked')) {         $('#hide-temp-submit').hide();         $('#show-submit').show();     } </script> 

and html:

<input type="checkbox" class="checkbox_check" name="" value=""> <button class="login_button" id='hide-temp-submit' style="background-color:#101010;color:grey;">please agree terms</button> <button class="login_button" id='create_button show-submit' style="display:none">create account</button> 

any on hiding 'dummy' submit button, , showing actual submit button once checkbox checked?

thank you!

use classes--you've got space in second buttons id:

<script type="text/javascript">         if ($('input.checkbox_check').is(':checked')) {         $('.hide-temp-submit').hide();         $('.show-submit').show();     } </script> 

html:

 <input type="checkbox" class="checkbox_check" name="" value="">  <button class="login_button hide-temp-submit"  style="background-color:#101010;color:grey;">please agree terms</button>  <button class="login_button create_button show-submit"  style="display:none">create account</button> 

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -