JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
src
LICENSE
README.md

README.md

jQuery Webino Ajax

Ajax made easy. Updates the elements by diffing.

Dependencies

<script src="//code.jquery.com/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="//cdn.jsdelivr.net/diffdom/0.0.1/diffdom.min.js" type="text/javascript"></script>
<script src="//cdn.rawgit.com/webino/diffhtml-jquery/develop/src/diffhtml.jquery.js" type="text/javascript"></script>

How To

Add those dependencies above and the following script to your index.html file:

<script src="//cdn.rawgit.com/webino/webino-ajax-jquery/develop/src/webino.ajax.jquery.js" type="text/javascript"></script>

Ajax navigation HTML element:

<nav class="ajax"><a href="example.json">Click me!</a></nav>

Ajax link HTML element:

<nav class="ajax"><a href="example.json">Click me!</a></nav>
<a class="ajax" href="example.json">Click me!</a>

Ajax fragment HTML:

<div id="my-content">Text example...</div>

Expected JSON structure:

{
  "fragments": {
    "#my-content": "<div id=\"my-element\">Text example updated...</div>"
  }
}

Addendum

This package is used by the Webino™ project.

Please, report any issues and don't hesitate to contribute.

Report a bug | Fork me