|
49 | 49 | /**
|
50 | 50 | * Checks to see if this device supports touch. Uses criteria pulled from Modernizr:
|
51 | 51 | * https://github.com/Modernizr/Modernizr/blob/da22eb27631fc4957f67607fe6042e85c0a84656/feature-detects/touchevents.js#L40
|
52 |
| - * @return {Boolean} - true if the current device supports touch. |
| 52 | + * @returns {Boolean} - true if the current device supports touch. |
53 | 53 | */
|
54 | 54 | this.isTouchDevice = function() {
|
55 | 55 | return !!(
|
|
62 | 62 | * Add anchor links to page elements.
|
63 | 63 | * @param {String|Array|Nodelist} selector - A CSS selector for targeting the elements you wish to add anchor links
|
64 | 64 | * to. Also accepts an array or nodeList containing the relavant elements.
|
65 |
| - * @return {this} - The AnchorJS object |
| 65 | + * @returns {this} - The AnchorJS object |
66 | 66 | */
|
67 | 67 | this.add = function(selector) {
|
68 | 68 | var elements,
|
|
191 | 191 | * Removes all anchorjs-links from elements targed by the selector.
|
192 | 192 | * @param {String|Array|Nodelist} selector - A CSS selector string targeting elements with anchor links,
|
193 | 193 | * OR a nodeList / array containing the DOM elements.
|
194 |
| - * @return {this} - The AnchorJS object |
| 194 | + * @returns {this} - The AnchorJS object |
195 | 195 | */
|
196 | 196 | this.remove = function(selector) {
|
197 | 197 | var index,
|
|
227 | 227 | * remove extra hyphens, truncate, trim hyphens, and make lowercase.
|
228 | 228 | *
|
229 | 229 | * @param {String} text - Any text. Usually pulled from the webpage element we are linking to.
|
230 |
| - * @return {String} - hyphen-delimited text for use in IDs and URLs. |
| 230 | + * @returns {String} - hyphen-delimited text for use in IDs and URLs. |
231 | 231 | */
|
232 | 232 | this.urlify = function(text) {
|
233 | 233 | // Regex for finding the nonsafe URL characters (many need escaping): & +$,:;=?@"#{}|^~[`%!'<>]./()*\
|
|
258 | 258 | * Determines if this element already has an AnchorJS link on it.
|
259 | 259 | * Uses this technique: http://stackoverflow.com/a/5898748/1154642
|
260 | 260 | * @param {HTMLElemnt} el - a DOM node
|
261 |
| - * @return {Boolean} true/false |
| 261 | + * @returns {Boolean} true/false |
262 | 262 | */
|
263 | 263 | this.hasAnchorJSLink = function(el) {
|
264 | 264 | var hasLeftAnchor =
|
|
276 | 276 | * It also throws errors on any other inputs. Used to handle inputs to .add and .remove.
|
277 | 277 | * @param {String|Array|Nodelist} input - A CSS selector string targeting elements with anchor links,
|
278 | 278 | * OR a nodeList / array containing the DOM elements.
|
279 |
| - * @return {Array} - An array containing the elements we want. |
| 279 | + * @returns {Array} - An array containing the elements we want. |
280 | 280 | */
|
281 | 281 | function _getElements(input) {
|
282 | 282 | var elements;
|
|
0 commit comments