Added alternative jquery approcah instead of core javascript