So i’m working on a new version of my calculator http://codepen.io/Mike-was-here123/pen/QrdJdO?editors=1010
You can see i’m trying to make it so every time i click on a item, i want it to run a function called solve
. I want it to .addEventListener() too all my buttons so i can get there ID’s, combine it, and eval() it for answer.
Uncaught TypeError: Cannot read property 'fn' of undefined
All my buttons are surrounded in a div with is ID “buttonRows”, any idea why it isn’t working?
I know my buttons are in row div’s, but i even tried calling by ClassName ‘row’ and it wasn’t a function.
This code was from another calculator i made, in which someone gave it to me to save time as it works for all buttons and getting there id’s. Those were in lists (ul
's) and worked then.
Not feeling like redoing my html to instead making it in lists, any way i can make this event listener work in rows?