Permalink
Browse files

'initial'

  • Loading branch information...
1 parent 850e504 commit 794b0ec6c24277c238650a5c9e800aa56e09d812 @macndesign committed Jun 28, 2012
Showing with 33 additions and 3 deletions.
  1. +33 −3 README.md
View
@@ -1,4 +1,34 @@
-jquery-data-ajax-place-update
-=============================
+# jquery-data-ajax-place-update
-Data update in place with jQuery only configuration html5 data attribute.
+Data update in place with jQuery only configuration html5 data attribute.
+
+## Installation
+
+Include script *after* the jQuery library:
+
+ <script src="/path/to/jquery-data-ajax-place-update.js"></script>
+
+## Usage
+
+Configure attributes in the link tag:
+
+ <a data-ajax='{"update": "#mysrc", "place": "#content"}' href="/test/">Test</a>
+ <div id="mysrc"></div>
+
+## Attributes legend:
+
+- update: HTML element to be inserted content.
+- place: Piece you want to capture of the link.
+
+## Define the resources:
+
+ <script type="text/javascript">
+ var $resources = {
+ 'load_image': '<img class="loader" src="/path/to/img/loader.gif" alt="Loading...">',
+ 'urlerror': '/error/',
+ 'url404': '/error-404/',
+ '$url500': '/error-500/'
+ }
+ </script>
+
+Enjoy!

0 comments on commit 794b0ec

Please sign in to comment.