Jocly Webmaster API

Jocly Webmaster API

Important note: the method consisting of integrating an iframe directly in the hosting page has now been obsoleted in favor of a much more efficient method described below. The description of the old method is still viewable here but should not be used anymore.

Embedding Jocly games in an external site is quite easy. The system relies on a javascript library, jquery.jocly, implementing a set of jQuery plugins. jquery.jocly is an open source library under Mozilla Public License 2.0. You can download it along with its source code from this github repository. You can check those examples of integration for an overview of the library capabilities. Chesschal.com is another example that may be useful. Use your browser's View page source in the example pages to see how the features are set up.

You should refer to the jquery.jocly documentation and examples source code to get your implementation running on your own site, however for convenience here is how to use the library in it's simplest form (embedding a Jocly applet to play against the computer any of the Jocly games):

 <html>
  <head>
    ...
    <link rel="stylesheet" href="jquery.jocly.min.css>
    <script src="http://code.jquery.com/jquery-1.10.1.min.js></script>
    <script src="jquery.jocly.min.js></script>
  </head>
  <body>
    ...
    <div data-jocly data-jocly-init='["localPlay","classic-chess"]'></div>
    ...
  </body>
</html>