Created
November 29, 2016 20:41
-
-
Save doublejosh/6ff5c44142e9d2c7bfcd8108dd349aa6 to your computer and use it in GitHub Desktop.
Late click via param
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
/** | |
* @file Click a DOM element via parameter (after the page load). | |
* | |
* Example: /techspecs?click=personal-sources#data-sources | |
*/ | |
(function ($) { | |
/** | |
* @todo waitFor(). | |
*/ | |
function clickParam() { | |
var parsed = Tabia.util.parseUrl(); | |
if (_.has(parsed.params, 'click')) { | |
$('#' + parsed.params.click).click(); | |
} | |
} | |
$(document).ready(clickParam); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment