-
-
Save renorram/2b41a0454ee1af7d684d3572daf3e7f3 to your computer and use it in GitHub Desktop.
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
// disparando | |
(function($) { | |
var element = $(window.activePageId + ' #{{obj.id}}'); | |
var event = new Event('{{obj.id}}'); | |
event.relatedTarget = element; | |
document.dispatchEvent(event); | |
})(jQuery); | |
// escutando | |
document.addEventListener('coeSubCategoryHeader', function(e) { | |
console.log(e); | |
console.log('test was invoked'); | |
// elemento estaria em e.relatedTarget | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment