3

I am using this function for niceScroll but it is not working in Safari. However, it is working fine in Firefox, chrome and even in IE. How can I resolve this?

jQuery(function($) {
    $(document).ready(function()
    {
      $(".tableClass").niceScroll();
    });
 });
Mahinder
  • 31
  • 2
  • 2
    I assume this is about the jQuery NiceScroll plugin? You will have to show us the relevant html as well, preferable in a [jsFiddle](http://jsfiddle.net/), for any one to be able to help you. – leo Apr 25 '14 at 10:58
  • Open Safaris developer window and check the console for possible errors – Tarmo Saluste Apr 25 '14 at 11:09

2 Answers2

0

There was some issue in jQuery Nicescroll 3.6.0. That's why it wasn't worked properly in safari. Now they solved it. Download the latest version. jQuery Nicescroll 3.6.7 and use it. I think it will work properly in all browser.

Sarower Jahan
  • 1,445
  • 1
  • 13
  • 20
-1

Sorry, I know this doesn't directly answer your question but can help you achieve what you are trying to achieve. What functionality are you trying to achieve by using the niceScroll plugin?

If it is smooth scrolling on anchor tags, you can do this:

$(function() {
  $('a[href*=#]:not([href=#])').click(function() {
      if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
      var target = $(this.hash);
      target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
      if (target.length) {
        $('html,body').animate({
          scrollTop: target.offset().top
        }, 1000);
        return false;
      }
    }
  });
});

http://css-tricks.com/snippets/jquery/smooth-scrolling/

else if it for softening the scroll effect when scrolling down a page, you can do this:

$(document).ready(function() {
    var page = $('#content');  // set to the main content of the page   
    $(window).mousewheel(function(event, delta, deltaX, deltaY){
        if (delta < 0) page.scrollTop(page.scrollTop() + 65);
        else if (delta > 0) page.scrollTop(page.scrollTop() - 65);
        return false;
    })
});

jquery vertical mousewheel smooth scrolling

Both solutions are cross-browser compatible.

Community
  • 1
  • 1
Asher
  • 393
  • 3
  • 16