Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- $(window).on('hashchange', function () {
- if(window.location.hash.indexOf('modal') === 1) {
- var hashIndex = window.location.href.indexOf('#');
- var stringBeforeHash = window.location.href.slice(hashIndex);
- console.log(stringBeforeHash);
- var aelement = $('a[href=' + stringBeforeHash + ']').children()[0];
- aelement.click();
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement