mercredi 31 juillet 2019

this code is not working on android browsers


this javascript code is not working on android browsers like Opera - Chrome, But works on iPhone (Safari), PC ...

;(function($){
          $.fn.extend({
              donetyping: function(callback,timeout){
                  timeout = timeout || 1e3;
                  var timeoutReference,
                      doneTyping = function(el){
                          if (!timeoutReference) return;
                          timeoutReference = null;
                          callback.call(el);
                      };
                  return this.each(function(i,el){
                      var $el = $(el);
                      $el.is(':input') && $el.on('keyup keypress paste',function(e){
                          if (e.type=='keyup' && e.keyCode!=8) return;
                          if (timeoutReference) clearTimeout(timeoutReference);
                          timeoutReference = setTimeout(function(){
                              $('.profile-wr-diary-time').html('<font color="orange"><?php echo bliz_gp('saving'); ?>...</font>');
                              doneTyping(el);
                          }, timeout);
                      }).on('blur',function(){
                          doneTyping(el);
                      });
                  });
              }
          });
        })(jQuery);




Aucun commentaire:

Enregistrer un commentaire