mercredi 28 octobre 2015

Laravel5 pagination with Jquery Ajax

I am using Laravel5 pagination. I have added some ajax code because when I click next button I don't need to refresh the page.

My issue is when I am clicking next button my page is refreshing. please help me to find this issue. My code and screen shot are given below.

js #abilitytest: Click function for showing data in bootstrap model

$( "#abilitytest" ).click(function() {
    $.post("/abilitytest", function(response){
        $( "#abilityQuestions" ).html(response);
    });
});


$('.pagination a').on('click', function (event) {
    event.preventDefault();
    var page = $(this).attr('href');
    console.log(page);
    alert('hai');
});

enter image description here



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1O7hBRW
via IFTTT

Aucun commentaire:

Enregistrer un commentaire