ZK framework’s Client Engine uses a customized jQuery. So you can use jq or $ as a jQuery object like:

$( "div" ).click(function() {
    //...
});

jq(mySelector).css( "background-color" );

You should consider implementing your client code with the bundled jQuery first. For API details, please refer to jQuery Documentation for details.

Version

To obtain the jQuery version bundled with your ZK version enter jq.fn.jquery into Console tab in a developer tool.

Load a Different jQuery

You can load a different version of jQuery by <script/> or <?script?>. Because ZK always load your script later than ZK framework scripts, the different version of jQuery will override $. Therefore, you can access 2 versions of jquery with different variables:

  • jq to access ZK’s bundled jQuery
  • $ to access jQuery you loaded

Notice that even you load another version of jQuery, ZK internally still uses the bundled jQuery.

Please check examples: