Ajaxing with URL Mapping - v0.1.0
Execute pre-configured ajax action based on url query string
- Empty
?
- Ajax 1
?ajxload=1
- Ajax 2
?ajxload=2
- Ajax 3
?ajxload=3
- Ajax 4
?ajxload=4
- Ajax 5
?ajxload=5
- Ajax 5 and trigger WET
?ajxload=5special
- Ajax two files
?special
Source code
<aside id="asidecontainer" class="col-md-5 pull-right">
<h2>Aside container</h2>
<p>Empty</p>
</aside>
<ul>
<li><a href="?">Empty <code>?</code></a></li>
<li><a href="?ajxload=1">Ajax 1 <code>?ajxload=1</code></a></li>
<li><a href="?ajxload=2">Ajax 2 <code>?ajxload=2</code></a></li>
<li><a href="?ajxload=3">Ajax 3 <code>?ajxload=3</code></a></li>
<li><a href="?ajxload=4">Ajax 4 <code>?ajxload=4</code></a></li>
<li><a href="?ajxload=5">Ajax 5 <code>?ajxload=5</code></a></li>
<li><a href="?ajxload=5special">Ajax 5 and trigger WET <code>?ajxload=5special</code></a></li>
<li><a href="?special">Ajax two files <code>?special</code></a></li>
</ul>
<div data-wb-urlmapping='{
"ajxload=1": { "action": "ajax", "url": "ajax/ajax-1.html" },
"ajxload=2": { "action": "ajax", "url": "ajax/ajax-2.html" },
"ajxload=3": { "action": "ajax", "url": "ajax/ajax-{{qval}}.html" },
"ajxload=4": { "action": "ajax", "url": "ajax/ajax-4.html" },
"ajxload=5": { "action": "ajax", "url": "ajax/ajax-5.html" },
"ajxload=5special": { "action": "ajax", "url": "ajax/ajax-5.html", "trigger": true },
"special": [
{ "action": "ajax", "url": "ajax/ajax-2.html", "container": "#asidecontainer" },
{ "action": "ajax", "url": "ajax/ajax-4.html" }
]
}'></div>
- Date modified: