Your mobileinit event work work unless you put this code in a file between jQuery and jQuery Mobile