how to prevent user from clicking button twice on server side in jqx
Preventing users from submitting forms twice becomes very easy with that module hide_submit.

Take a look at the issues as many features patched but not yet in the master branch of that module.

It may guides to achieve the same thing for (non submit buttons).