Updated task state change methods to retain compatibility with jQuery