JavaScript

From Things and Stuff Wiki
Revision as of 23:56, 1 February 2012 by Milk (talk | contribs)
Jump to navigation Jump to search


jQuery

News

Plugins

Scroll to anchor

$('body').plusAnchor({
  easing: 'swing',    // The easing method, defaults are 'swing' and 'linear'. Anything else  requires the easing.js plugin
  speed:  1000        // The amount of time, in milisecons, it takes to complete a transition
});
$("#someDiv").slideto({
  highlight_color: 'blue',
  highlight_duration: 'slow',
  slide_duration: 500
});
$("some_selector").scrollintoview({
   duration: 2500,
   direction: "vertical",
   complete: function() {
     // highlight the element so user's focus gets where it needs to be
   }
});

Keep element on page