Help Ajax

Hi i am trying check credit cart type on checkout page

But $(“.payment[cart_number]”).on(‘keyup’,function( e ) {


Never trigger anything. I tried alot of thing document ready etc

I need only how can i work this ?

Try using "card_number" rather than "cart_number". But I really don't think you want a keyup, I would think you'd want this on blur or onchange so you can validate the completely entered card number.


And what are you trying to validate? Cs-cart already uses the algorithms used by the card industry for validating card numbers....

Input name dont important mate. I am try last step on chcek out page, also no matter keyup keydown doesnt work

Cs-cart checkonly cart type master visa etc, i want check cart family and i will show installments


For eg ajax autocomplete working but keykup keydown doesnt work

Default template with credit card fields (cc.tpl) has card type checker. Just check how it works if you use your own template

i fix my code but i have different problem now

(function(_, $){
$(function(){

    $("[name='payment_info[card_number]']").blur(function() {

        var check_card = $("[name='payment_info[card_number]']").val();
        var check_price = $("[name='card_total']").val();

        $.ceAjax('request', fn_url('check.identify_cart?check_card=' + check_card + '&check_price=' + check_price), {
            cache: false,
            callback: function(data) {
                $(".installments").html(data.installments);
            }
        });


    });

});

})(Tygh, Tygh.$);

working with this way. but when i change step eg: to shpiing steps after cart step doesnt work

what can i do ?

fixed with document tag. thnks

hi again all is working on pc. firefox explorer etc

but iphone safari nothing ?

how can i fix ?