used jquery events to manipulate the dom