On the order page, there is 3 buttons
[New Order] [Processing] [Completed]
If I click on the processing button – the background of the button should change. It will also update the order status to the database.
[New Order] button will have green background by default. If I click on the [Processing] button, the background-color will turn into green. [New Order] will no longer have a background-color.
What the best way dealing with this using Jquery Ajax?
Use jQuery’s css and get/post functions….
HTML:
CSS:
JS: