fixed state toggling on items after switch to jquery