When you view the results with a browser, and right click and select "view source", examine the script in the head section and take a look at the divs in the body. Are the ID or Classes you are referencing in the jQuery code still valid?
Master Pages just maintaing design for your content pages but doesn't execute or provide script to content pages
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: