* Fix bug when checking if elements were parsed already
parse-element.js checks if the element was already parsed by
checking for the `data-pjax-click-state` attribute. However, this
attribute was not added until the link is clicked.
Originally, there was a separate attribute, `data-pjax-enabled`,
which tracked if the element was parsed already, but that was
changed in 9a86044.
This commit merges the attributes for mouse clicks and key presses
into one and adds that attribute when the element is initially
parsed.
* More bug fixes
* Fix documentation for currentUrlFullReload
* Ignore lines from coverage if they can't be tested
* Refactor attach-link and attach-form
* Fix and refactors tests
* Add tests
* Add TS definitions for options.requestOptions
* Code cleanup
30 lines
1001 B
HTML
30 lines
1001 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Hello</title>
|
|
<script src="../pjax.js"></script>
|
|
<script src="example.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="body">
|
|
<h1>Index</h1>
|
|
Hello.
|
|
Go to <a href="page2.html" class="js-Pjax">Page 2</a> or <a href="page3.html" class="js-Pjax">Page 3</a> and view your console to see Pjax events.
|
|
Clicking on <a href="index.html">this page</a> will do nothing.
|
|
|
|
<h2>Manual URL loading</h2>
|
|
|
|
You can use Pjax's <i>loadUrl</i> method to manually load a URL. Click the buttons below to try it out!<br /><br />
|
|
|
|
<button data-manual-trigger>loadUrl with current options</button><br /><br />
|
|
<button data-manual-trigger data-manual-trigger-override="true">loadUrl with overridden options (no cache busting)</button>
|
|
|
|
<h2>Forms</h2>
|
|
|
|
You can submit GET or POST forms with Pjax! Go to the <a href="forms.html">form examples</a> to try it out.
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|