Jquery Nested Functions Not Working
The purpose of my code is to solve a system of three equations. What I want to happen is for the 'p' selector and the 'answer' class to be hidden. When there is a 'click' event on
Solution 1:
Your Jquery code line #9:
$(".button")click(function() {
You are missing a "." after the selector:
$(".button").click(function() {
Solution 2:
I see a number of issues:
- You missed a period in
$(".button")click
, should be$(".button").click
- The fiddle had a closing script tag (which aren't needed there, fyi) but you had no closing brackets for the
document.ready
function - You have an inline
onClick
handler calling a function defined inside the document.ready function. That won't be visible to the html element. You're using jquery already so just use a click handler - You have several functions wrapped inside each other for the calculator part, that's not needed and will cause some scope problems. You're mixing native js with jquery as well,
document.getElement*
type code when you have the$
selector available
A fiddle to get you started
Solution 3:
Your second <h1>
(the new one) is closed with </h2>
. (Might not be the primary problem.)
Post a Comment for "Jquery Nested Functions Not Working"