Conversation
Is_He_Gay.html
Outdated
There was a problem hiding this comment.
You need to uncomment this line... init() is never being called.
|
I appreciate you putting a lot of effort into getting this to work, and I know it can be frustrating. Normally, I would let you work out the solution, but I want to get you unstuck. Here's how I would rewrite your current code, jQuery-ified: var soundButton, hiddenBox;
var init = function() {
soundButton = $('#sound');
hiddenBox = $('#popUpSound');
// register all the event listeners at once
soundButton.on('click', showPopUp);
hiddenBox.on('click', hidePopUp);
};
var showPopUp = function() {
hiddenBox.show();
};
var hidePopUp = function() {
hiddenBox.hide();
};
// basically the same as window.addEventListener('load', init)
$(document).on('ready', init);Let me know if you have any questions! Also, this pull request is live at http://astrolingus.github.io/react/Is_He_Gay.html, but all of the images are broken. It makes my life a lot easier if you make http://astrolingus.github.io/react/ display the project... would you mind renaming |
No description provided.