When I add the following block of code:
on(dom.byId("btnCancelFeedback"), "click", function () {
document.getElementById("feedbackModal").style.visibility = 'hidden';
});I receive an error as follows:
"in domReady callback"
"TypeError: Cannot read property 'on' of null
I have used this method in the past with no issues including inside this project, but this causes an error. Any ideas?
Here is my complete app on github:https://github.com/csergent45/streetSigns
The JavaScript is in app/main.js
This is what ended up working:
on(dom.byId("btnCancelFeedback"), "click", function () {
query("#feedbackModal").modal("hide");
});The other thing that worked is when I changed removed the double quotes from feedbackModal and replaced them with single quotes.