Good afternoon. I am fairly new to all this and am needing someone to
point me in right direction with an issue I am having.
I have the page working to create a button dynamically inside a div.
When the page is first loaded all of the buttons when clicked have their
color change and the rest of them return to their default color.
- $('.gradeButtons
button').on("click",function() {
- $(this).siblings().removeClass('quoteGrading');
- $(this).toggleClass('quoteGrading');
- });
For some reason that I cant figure out this does not work for
dynamically created buttons.
Can anyone tell me what I am missing or direct me to an example that
shows how to dynamically create a button and have it be able to change
its color on click?
Gradebuttons is the div identifier.