Fixed for latest version of jQuery

Changed all the specified view() functions to the non-depricated on() functions.

This bug was causing errors with the latest build of jQuery.

Asha23