php ajax分页从另一个域获取数据

So, i have a site that grabs data from another one of my sites and displays it accordingly. Things are starting to slow down as there is now a lot of data and the query i have grabs all results. So its time to implement some pagination.

Here is my jQuery to grab the data:

jQuery(document).ready(function(){
    jQuery(document).on('click','.show_more',function(){
        var ID = jQuery(this).attr('id');
        jQuery('.show_more').hide();
        jQuery('.loding').show();
        jQuery.ajax({
            type:'POST',
            async: true,
                        crossDomain : true,
            url:'http://example.com/retailers/products.php?apikey=123456&retailer=Test',
            data:'id='+ID,
            success:function(html){
                jQuery('#show_more_main'+ID).remove();
                jQuery('.retailitems').append(html);
            }
        }); 
    });
});

With the above i get the following error:

 No 'Access-Control-Allow-Origin' header is present on the requested resource.

I know i can use datatype: jsonp but is there an alternative i can use, as i own the other domain? Is there something i can setup on the other domain to allow this?

Add .htaccess file at the root folder to remove the cross origin issue on the domain from where you are getting data..

<IfModule mod_rewrite.c>
RewriteEngine On
</IfModule>
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Access-Control-Allow-Origin"
Header always set Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"

Found that this works, placing it at the top of the requested file:

header('Access-Control-Allow-Origin: *');