SHARE
TWEET

Untitled

a guest Oct 13th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <select>
  2.     <option>Jump to a letter: </option>
  3.     <option>A</option>
  4.     <option>B</option>
  5.     ...
  6. </select>
  7.    
  8. jQuery('.glossary-mobile-nav select').change(function () {
  9.     var id = jQuery(this).val();
  10.     var target = jQuery('.glossary-list div[id="'+id+'"]');
  11.  
  12.     jQuery('html, body').animate({
  13.         scrollTop: target.offset().top
  14.     }, 1000);
  15. });
RAW Paste Data
Top