rewrite for jquery in stead of ender because Flot uses jq
fix editing and running