This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Overrides default JQuery.scrollTop to account for top header nav | |
* @requires JQuery | |
* @see http://api.jquery.com/scrollTop/ | |
* @see https://github.com/jquery/jquery/blob/master/src/offset.js for scrollTop declaration | |
**/ | |
(function($) { | |
var topOffset = 120; // height to account for in scrolling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: var s; | |
/*Figure out the selected text*/ | |
if ( window.getSelection ) { | |
s = window.getSelection(); | |
} else if ( document.getSelection ) { | |
s = document.getSelection(); | |
} else { | |
s = document.selection.createRange().text; | |
} | |
/*If there isn't any text selected, get user input*/ |