[inmethod-grid] Issue #308 - Improvements to script-jq.js (the new JQuery based impl)

(cherry picked from commit dfd79cc545090ff97dc26ef80e1a76ee7b1ae32b)