fix template bug
replace jquery to document