Skip to content

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

@arogachev

Description

@arogachev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions