Update view.js

Changed view to fit with jQuery mobile events