Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application.js Example #51

Closed
tomrossi7 opened this issue Oct 24, 2012 · 4 comments
Closed

Application.js Example #51

tomrossi7 opened this issue Oct 24, 2012 · 4 comments

Comments

@tomrossi7
Copy link

Is this example really correct?

$('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]');

I couldn't get it to work and looking around, it appears that what is passed to the .pjax method should actually be the link targets -- not the container? Am I missing something?

$(container).pjax( link, options )

Thanks,
Tom

@tombenj
Copy link

tombenj commented Oct 26, 2012

This:
$('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]');

is currently broken for me. i get:
Uncaught TypeError: Object [object Object] has no method 'pjax'

@chrokh
Copy link

chrokh commented Nov 9, 2012

+1 for the poster.

In the readme-file, this line:

$('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]');

...should read "the other way around", like so:

$('[data-pjax-container]').pjax('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])');

The examples on https://github.com/defunkt/jquery-pjax seem to follow the second convention. Like so:
javascript $(container).pjax( link, options )

@hayksaakian
Copy link

please update the documentation to reflect this. I was struggling to implement pjax_rails for several days, and I was about to put in an issue before reading this one.

@deiga deiga mentioned this issue Feb 1, 2013
@route
Copy link
Collaborator

route commented Oct 29, 2013

Docs were updated

@route route closed this as completed Oct 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants