Yii2 ListView Next Button URL Properly Not Getting

In ListView can’t get Next button proper url using jquery.

show below jquery code

<?php

$this->registerJs(

"$(function () {

$(’.saveNext’).on(‘click’, function () {

 &#036;.ajax({


    url: '&quot;.Url::to(['save-next']).&quot;',        


    success : function() {


        alert(&#036;('.nexta').attr('data-page'));


        window.location.href=&#036;('.nexta').attr('href');


    }


 });

});

});

");

?>

This is my ListView Code:

<?php

echo ListView::widget([


        'dataProvider' =&gt; &#036;dataProvider,


        'itemView' =&gt; '_view',                 


        'layout'=&gt;'{items}{pager}',


         'pager' =&gt; [


                'options'=&gt;['class'=&gt;'pagination'],


                'prevPageLabel' =&gt; 'Previous',  


                'nextPageLabel' =&gt; 'Next',  


                'nextPageCssClass' =&gt; 'next',    


                'prevPageCssClass' =&gt; 'prev',    


                'maxButtonCount' =&gt; 0,


                'linkOptions' =&gt; ['class' =&gt; 'nexta'],


            ],


        ]);                

?>

<?= Html::submitButton(Yii::t(‘ot’, ‘Save & Next’), [‘class’ => ‘btn btn-primary btn-create saveNext’, ‘name’ => ‘saveNext’, ]) ?>

This is my pagination next button Html Code

<a class="nexta" data-page="1" href="/myproject/attempt-test?attempt-test=&page=2&per-page=1">Next</a>