Introduction"

From Documentation
 
(7 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
ZK Client-side Reference is the reference for client-side programming, including component development.
 
ZK Client-side Reference is the reference for client-side programming, including component development.
  
Client-side programming is optional to application developers. However, if you'd like to have more control of the client, please refer to the [[ZK Client-side Reference/General Control|General Control]] and [[ZK Client-side Reference/Customization|Customization]] sections. The other sections are more for component development.
+
Client-side programming is optional for application developers. However, if you'd like to have more control of the client, please refer to the [[ZK Client-side Reference/General Control|General Control]] and [[ZK Client-side Reference/Customization|Customization]] sections. The other sections are more for component development.
  
If you would like to develop a component, you should read [[ZK Component Development Essentials]] first for introduction. Then, you could reference this book if there is an issue.
+
If you would like to develop a component, you should read [[ZK Component Development Essentials]] first for the introduction. Then, you could reference this book if there is an issue.
 
 
= jQuery =
 
ZK Client Engine is based on [http://jquery.com/ jQuery], so you can use '''<tt>jq</tt>''' or '''<tt>$</tt>''' as a jQuery object like:
 
 
 
<source lang='javascript'>
 
$( "div" ).click(function() {
 
    //...
 
});
 
 
 
jq(mySelector).css( "background-color" );
 
</source>
 
 
 
You should consider implementing your client code with the bundled jQuery first. For API details, please refer to [http://docs.jquery.com/Main_Page jQuery Documentation] for details.
 
 
 
== Version ==
 
To obtain the jQuery version bundled with your ZK version enter <tt>jq.fn.jquery</tt> into Console tab of a developer tool.
 
 
 
 
 
== Load Multiple jQuery ==
 
If you want to load a different version of jQuery, which is not recommended, you need to avoid 2 versions of jQuery conflicts by <tt>noConflict()</tt> (Please refer to https://api.jquery.com/jquery.noconflict/)
 
 
 
<source lang='xml' high="6">
 
<zk>
 
<javascript src="https://code.jquery.com/jquery-2.1.4.min.js" />
 
<javascript>
 
var jQuery2 = jQuery.noConflict(true);
 
</javascript>
 
<!-- other components -->
 
</zk>
 
</source>
 
* Line 6: Restore ZK registed jQuery object. Use a different version (2.1.4) of jQuery with <tt>jQuery2</tt>
 
  
  

Latest revision as of 01:55, 2 March 2020




ZK Client-side Reference is the reference for client-side programming, including component development.

Client-side programming is optional for application developers. However, if you'd like to have more control of the client, please refer to the General Control and Customization sections. The other sections are more for component development.

If you would like to develop a component, you should read ZK Component Development Essentials first for the introduction. Then, you could reference this book if there is an issue.





Last Update : 2020/03/02

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.