simplr-smoothscroll icon indicating copy to clipboard operation
simplr-smoothscroll copied to clipboard

Newer browser check method a good idea?

Open edencorbin opened this issue 9 years ago • 0 comments

Plugin is working fantastic, I thought I would share that the browser check is an obsoleted jQuery function, I got the results I was looking for with the following code. If you find this useful, please feel free to include/update for readme:

$(function () {
  var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
  if (isChrome) {
     $.srSmoothscroll({
       // defaults
       step: 55,
       speed: 400,
       ease: 'swing',
       target: $('body'),
       container: $(window)
     })
  }
});

edencorbin avatar Dec 08 '15 02:12 edencorbin