Skip to content

Documentation of options object #262

@davecranwell

Description

@davecranwell

The documentation doesn't really cover how to use this plugin in a variety of situations. It appears to suggest that the only way of implementing this is if you're able to modify headers in your server.

I tried implementing with just the following code on a static site:
$(document).pjax('nav a', '#content-main');

However it doesn't seem to do anything, no errors, but no action either. Changing it to the following, and it works fine:

$(document).pjax('nav a', '#content-main', {fragment: '#content-main'});

It would be nice if you could document the options a bit further, giving examples of the situations in which you might use them.

(I note that the readme in the 'allow-body-fragment' branch contains much of the missing documentation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions