jQuery

Touch Functionality for Jquery UI Components

jquery

jQuery UI library have lots of features within it like Draggable, Droppable, Sortable, Accordian, Slider etc.., but unfortunately is not supporting touch effect (event). It is the major issue in the current mobile world. Lots of libraries are available to solve the problem, one of the best library is jQuery UI Touch Punch, Let see how to get the Touch Functionality in jQuery UI with the Touch Punch Library,

Smooth Scrolling in jQuery

$(document).ready(function() {
  $('a[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) {
           $target.ScrollTo(400);
           return false;
       }
    };
  });
});