trying jc's jquery method