<script type="text/javascript">
    function getRecord(href)
    {
        var dataurl = '<?= $dataURL ?>';
        var posturl;
        if (href)
        {
            var posturl = href;
        }
        else
        {
            var posturl = '<?= site_url() ?>' + dataurl;
        }
        $.ajax({
            type: "GET",
            url: posturl,
            beforeSend: function() {},
            success: function(html) {
                $("ul#media-list").html('');
                $("ul#media-list").append(html);
            }
        });
        return false;
    }
    $(document).ready(function(e) {
        getRecord(null);
        $('body').on('click', '.left_paging a', function() {
            var href = $(this).attr('href');
            getRecord(href, null);
            return false;
        });
    });
</script>