codeigniter pagination url with get parameters

后端 未结 15 1900
野的像风
野的像风 2020-12-12 14:52

I am having trouble setting up pagination on codeigniter when I pass parameters in the URL

if my url is like this : search/?type=groups

what sho

15条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 14:57

    Here is my jquery solution:

    Just wrap pagination links in a div like this:

    $config['full_tag_open'] = '';
    

    than add the following jquery code:

    $("#pagination > a").each(function() {
        var g = window.location.href.slice(window.location.href.indexOf('?'));
        var href = $(this).attr('href');
        $(this).attr('href', href+g);
    });
    

    Works fine for me.

提交回复
热议问题