js for tabs assignment