Hi everyone, I am working on a project that need to use jquery mousedown event from external javescript. I need to get the element id from where I set it in my hype. My client never using hype before. so that I have to make sure they can use the id in the future? How would I do with that. very appreciated!
Hype uses regular ID’s but the problem is that Hype is “constructed” after the DOMContentLoaded event. Hence you have to fire your code in a Hype specific event listener.
function hypeLoadedCallback (hypeDocument, element, event) {
$("#BtnLight").mouseup(function(){alert(“test”);});
}
if("HYPE_eventListeners" in window === false) {
window.HYPE_eventListeners = Array();
}
window.HYPE_eventListeners.push({"type":"HypeDocumentLoad", "callback":hypeLoadedCallback});