Uncaught TypeError: Cannot read property 'createDocumentFragment' of undefined


this will happen in an ajax call because inside the $.ajax() you are refering to $(this) when ajax will not inherit.  you need to store this in a variablevar cache = $(this)


2016-07-06 12:50:20gstlouis

        cache = $(this);
                url: '/assets/php/online-payment',
                type: 'post',
                data: 'invoice-number='+invoice+'&ajax=1',
                beforeSend: function(){
                    cache.append('&nbsp;<i class="fa fa-spinner fa-pulse fa-fw"></i>');
                    $('#invoice-number input[name="member-invoice"]').parent().after('<span id="invoice-processing"><?php echo __("we are pulling your invoice information"); ?>...</span>');

                    //disable the btn
                    cache.prop('disabled', true);
                complete: function(){
                success: function(data){
                error: function(){
                    alert('<?php echo __("sorry, there was a problem processing your request"); ?>');

2016-07-06 12:50:47