Pjax

Typings

pjax-api.d.ts

new Pjax(config: Config): Pjax

Use pjax.

import Pjax from 'pjax-api';

new Pjax({
  areas: [
    '#header, #primary',
    '#container',
    'body'
  ]
});

Config

Config

#assign(url: string): boolean

Go to url.

The return type means the request is accepted or not. In other words, in progress or not. The same shall apply hereinafter.

new Pjax({}).assign('/');

#replace(url: string): boolean

Go to url with replacing.

new Pjax({}).replace('/');

.assign(url: string, config: Config): boolean

Go to url.

Pjax.assign('/', {});

.replace(url: string, config: Config): boolean

Go to url with replacing.

Pjax.replace('/', {});