Updates to jQuery Function