Initial commit
This commit is contained in:
11
_includes/js/modal-hash-js.html
Normal file
11
_includes/js/modal-hash-js.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<script>
|
||||
window.addEventListener('load', function () {
|
||||
if (window.location.hash) {
|
||||
/* if url has a hash, open the related item modal */
|
||||
var hashModal = decodeURIComponent(location.hash.substr(1));
|
||||
if (document.querySelector('#' + hashModal + 'Card a')) {
|
||||
document.querySelector('#' + hashModal + 'Card a').click();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user