avoid unnecessary calls to jQuery