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

Allow "data-pjax" attribute with no value in handleClick function #46

Closed
arogachev opened this issue Jan 7, 2017 · 0 comments
Closed
Milestone

Comments

@arogachev
Copy link

Related issue in Yii2 - yiisoft/yii2#13300. Should be synchronized here.

This check:

// Ignore links with data-pjax="0"
if ($(link).data('pjax') == 0) {
    return;
}

needs to be modified accordingly too, because "" == 0 will evaluate to true.

Can be:

$(link).data('pjax') === 0)

(data returns 0 as number).

Or in case of a string which is returend by attr for example:

$(link).attr('data-pjax') === '0'

Or maybe even better:

parseInt($(link).data('pjax')) === 0
arogachev added a commit to arogachev/jquery-pjax that referenced this issue Jan 7, 2017
@samdark samdark added this to the 2.0.7 milestone Jan 7, 2017
samdark added a commit that referenced this issue Jan 12, 2017
Fixed #46: Allow "data-pjax" attribute with no value in handleClick function
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

2 participants