Tim Rowland Tim Rowland - 1 year ago 90
HTML Question

HTML slider won't hide

I am trying to hide an html slider and submit button with jquery when the submit button is clicked. Unfortunately, my code isn't working and the slider and submit button are only momentarily hidden before they come back. I would really appreciate and help!

<input id="bet" type="range" min="0" max="100" value="0" step="1" onchange="showValue(this.value)" />
<input id="submit_bet" type="submit" value="Submit Bet!"/>

<span id="range">0</span>

<script type="text/javascript">
function showValue(newValue)

<script type="text/javascript">
$("#submit_bet").click(function() {

Answer Source

Maybe I understand your design...

If you just want to hide slider and submit button when you clicked, you can try:

<input id="submit_bet" type="button" value="Submit Bet!"/>

When you use type="submit" button, it will send form and refresh the page.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download