Jump to content

Add loading text on order confirmation button


Recommended Posts

This is the code of my add to cart button:

<div class="confirm_button_div">
    <input type="button" id="order_confirm_button_submit" class="confirm_button" title="{l s='I confirm my order' mod='onepagecheckout'}"
           value="»  {l s='I confirm my order' mod='onepagecheckout'}  «"
           onclick="paymentModuleConfirm();"/>
    <span class="caricamento">{l s='Loading... please wait...' mod='onepagecheckout'}</span>
</div>

I tried using this code to add below the add to cart button a loading text, but nothing happens:

<script type="text/javascript">
    var loading = '<span class="loading">{l s='Loading... please wait...!!!!!' mod='onepagecheckout'}</span>';
    $(document).ready(function() {
	$('#order_confirm_button_submit').click(function(){
            $('#order_confirm_button_submit').append('<b>'+loading+'</b>');
            return false;
        });
    });
</script> 

I don't understand why it doesn't works... Any idea?

Link to comment
Share on other sites

×
×
  • Create New...