Commit Graph
27 Commits
Author SHA1 Message Date
Behind The Math 39a96e51e7 Add tests 2018-04-09 23:31:04 -04:00
Behind The Math f3dd755a97 Fix and refactors tests 2018-04-09 23:31:03 -04:00
Behind The Math cd7be77d99 Refactor attach-link and attach-form 2018-04-09 23:31:03 -04:00
Behind The Math 31a6f44c97 Ignore lines from coverage if they can't be tested 2018-04-09 23:31:03 -04:00
Behind The Math dddb4dd2fb Fix documentation for currentUrlFullReload 2018-04-09 23:31:02 -04:00
Behind The Math 494f1f35ac Bug fixes 2018-04-09 23:31:02 -04:00
Behind The Math ee82d0e0c7 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.
2018-04-09 23:31:02 -04:00
Behind The Math 17d8262025 Add X-PJAX-Selectors header 2018-04-09 23:28:46 -04:00
Behind The Math a2982cfcba Edit README to assign the Pjax instance to a variable 2018-03-15 16:38:03 -04:00
Behind The Math 333ee344f4 Fix bug in contains() argument list
Fixes #135
2018-03-09 09:32:58 -05:00
Behind The Math 90d26d641c Remove focus from form elements as well. 2018-01-29 13:51:00 -05:00
Behind The Math 2d4df39f72 Remove a redundant call to .blur() 2018-01-24 20:19:02 -05:00
Behind The Math fa05e94f07 Only blur element if it's contained by one of the selectors
Previously, Pjax would blur (remove focus) from the active element
regardless of where it was on the page. This restricts that to
happen only if the active element is contained by one of the
elements represented by options.selectors, because only those are
affected by Pjax.

Fixes #4
2018-01-24 20:18:41 -05:00
Behind The Math 3c8cd087c5 Use double quotes in CLI arguments
Single quotes don't work in all environments.
2018-01-23 19:40:13 -05:00
Behind The Math 12f3be21fb Exclude pjax.min.js fom JSCS 2018-01-23 19:35:18 -05:00
Behind The Math b74fbc4178 Add a minified version of Pjax to NPM
Fixes #108.
2018-01-23 17:53:10 -05:00
Behind The Math 6000ad5620 Restore the trigger for the resize and scroll events to onSwitch 2018-01-22 20:42:57 -05:00
Behind The Math e7935d9c74 Add scrollRestoration option 2018-01-22 18:56:22 -05:00
Behind The Math 546b9abba3 Small bug fix 2018-01-22 17:32:59 -05:00
Behind The Math bc2432b18c Scroll to element position when URL contains a hash
When the URL contains a hash, try to find the corresponding
element, and if found, scroll to its position.

Based on darylteo/pjax@4893a2a657

Fixes #22.
2018-01-22 11:45:42 -05:00
Behind The Math 37d303ed66 Save scroll position with history
Save scroll position when navigating away from a page, and restore
it when navigating back to that page.

Fixes #30.
2018-01-22 11:27:13 -05:00
Behind The Math 36ed7079b1 Fix tooling for the example
Apparently we do need opn-cli.
2018-01-15 16:36:29 -05:00
Behind The Math 3bd101bb1d Update JSCS to the latest version 2018-01-09 14:09:40 -05:00
Behind The Math c0d64e41b8 Fix linting errors 2018-01-09 14:09:40 -05:00
Behind The Math e586440964 Update JSCS includes and excludes 2018-01-09 14:09:40 -05:00
Behind The Math d3d5ef7a11 Pass the element that triggered Pjax to the pjax:send event
Closes #62.
2017-12-21 13:06:49 -05:00
Behind The Math 0781f820ee Add switchElementsAlt() to the default switches
Fixes #83.
2017-12-19 15:56:48 -05:00