Update workflow/conventions/tools
This commit is contained in:
40
README.md
40
README.md
@@ -135,8 +135,8 @@ Let's talk more about the most basic way to get started:
|
||||
|
||||
```js
|
||||
new Pjax({
|
||||
elements: "a" // default is "a[href], form[action]"
|
||||
, selectors: ["title", ".my-Header", ".my-Content", ".my-Sidebar"]
|
||||
elements: "a", // default is "a[href], form[action]"
|
||||
selectors: ["title", ".my-Header", ".my-Content", ".my-Sidebar"]
|
||||
})
|
||||
```
|
||||
|
||||
@@ -203,8 +203,8 @@ Examples:
|
||||
|
||||
```js
|
||||
new Pjax({
|
||||
selectors: ["title", ".Navbar", ".js-Pjax"]
|
||||
, switches: {
|
||||
selectors: ["title", ".Navbar", ".js-Pjax"],
|
||||
switches: {
|
||||
// "title": Pjax.switches.outerHTML // default behavior
|
||||
".Navbar": function(oldEl, newEl, options) {
|
||||
// here it's a stupid example since it's the default behavior too
|
||||
@@ -249,23 +249,23 @@ with or without [WOW.js](https://github.com/matthieua/WOW).
|
||||
|
||||
```js
|
||||
new Pjax({
|
||||
selectors: ["title", ".js-Pjax"]
|
||||
, switches: {
|
||||
selectors: ["title", ".js-Pjax"],
|
||||
switches: {
|
||||
".js-Pjax": Pjax.switches.sideBySide
|
||||
}
|
||||
, switchesOptions: {
|
||||
},
|
||||
switchesOptions: {
|
||||
".js-Pjax": {
|
||||
classNames: {
|
||||
// class added on the element that will be removed
|
||||
remove: "Animated Animated--reverse Animate--fast Animate--noDelay"
|
||||
remove: "Animated Animated--reverse Animate--fast Animate--noDelay",
|
||||
// class added on the element that will be added
|
||||
, add: "Animated"
|
||||
add: "Animated",
|
||||
// class added on the element when it go backward
|
||||
, backward: "Animate--slideInRight"
|
||||
backward: "Animate--slideInRight",
|
||||
// class added on the element when it go forward (used for new page too)
|
||||
, forward: "Animate--slideInLeft"
|
||||
}
|
||||
, callbacks: {
|
||||
forward: "Animate--slideInLeft"
|
||||
},
|
||||
callbacks: {
|
||||
// to make a nice transition with 2 pages as the same time
|
||||
// we are playing with absolute positioning for element we are removing
|
||||
// & we need live metrics to have something great
|
||||
@@ -495,9 +495,9 @@ wrapper on each page (to avoid differences of DOM between pages)
|
||||
```html
|
||||
<script>
|
||||
var disqus_shortname = 'YOURSHORTNAME'
|
||||
, disqus_identifier = 'PAGEID'
|
||||
, disqus_url = 'PAGEURL'
|
||||
, disqus_script = 'embed.js'
|
||||
var disqus_identifier = 'PAGEID'
|
||||
var disqus_url = 'PAGEURL'
|
||||
var disqus_script = 'embed.js'
|
||||
(function(d,s) {
|
||||
s = d.createElement('script');s.async=1;s.src = '//' + disqus_shortname + '.disqus.com/'+disqus_script;
|
||||
(d.getElementsByTagName('head')[0]).appendChild(s);
|
||||
@@ -512,9 +512,9 @@ wrapper on each page (to avoid differences of DOM between pages)
|
||||
<!-- if (blah blah) { // eventual server side test to know wheter or not you include this script -->
|
||||
<script>
|
||||
var disqus_shortname = 'YOURSHORTNAME'
|
||||
, disqus_identifier = 'PAGEID'
|
||||
, disqus_url = 'PAGEURL'
|
||||
, disqus_script = 'embed.js'
|
||||
var disqus_identifier = 'PAGEID'
|
||||
var disqus_url = 'PAGEURL'
|
||||
var disqus_script = 'embed.js'
|
||||
|
||||
// here we will only load the disqus <script> if not already loaded
|
||||
if (!window.DISQUS) {
|
||||
|
||||
Reference in New Issue
Block a user