Add jquery option and fix bug