samdark / yii2-cookbook

Yii 2.0 Community Cookbook
1.44k stars 297 forks source link

PJAX: open all links with PJAX but make some exceptions #97

Open samdark opened 8 years ago

samdark commented 8 years ago
<?php \yii\widgets\Pjax::begin([
    'linkSelector' => 'a:not('.no-pjax')',
<a class="no-pjax" href="http://example.com/">Read more</a>
rubenheymans commented 8 years ago

can't you just use data-pjax="0"?

samdark commented 8 years ago

Yes :)