I'm using couple buttons to toggle divs. Whenever I click on the button, the page jumps.
Any ideas?
Here's my markup:
<label class='radio btn'>
<input checked='checked' id='donation_payment_type_eft' name='donation[payment_type]' type='radio' value='eft'>
<span class='payment-type-echeck' style='background-position: -413px 0;'>ECheck</span>
</label>
<label class='radio btn'>
<input id='donation_payment_type_cc' name='donation[payment_type]' type='radio' value='cc'>
<ul class='card_logos'>
<li class='card_visa'>Visa</li>
<li class='card_mastercard'>Mastercard</li>
<li class='card_amex'>American Express</li>
<li class='card_discover'>Discover</li>
</ul>
</label>
and my jQuery:
$('#donation_payment_type_eft, #donation_payment_type_cc').change(function(e) {
$('.eft_donation').toggle();
$('.cc_donation').toggle();
e.preventDefault();
return false;
});
Try to do that steps:
_