change javascript to jquery.