code: function (callback) {
              var support = self.isSupported();
              if ( !support || !self.hidden() ) {
                  callback();
                  return support;
              }
  
              var listener = self.change(function (e, state) {
                  if ( !self.hidden() ) {
                      self.unbind(listener);
                      callback();
                  }
              });
              return listener;
          }
docs: Call callback only when page become to visible for user or call it now if page is visible now or Page Visibility API doesn’t supported.  Return false if API isn’t supported, true if page is already visible or listener ID (you can use it in `unbind` method) if page isn’t visible now.  Visibility.onVisible(function () { startIntroAnimation(); });