replace jquery by native js + fix functional bug