on function not working need help

on line 315 in index file having issues on all browsers