here is my ajax request function
function get_from_rss(div_id , link_ ){
jQuery.support.cors = true;
$.ajax({
url : link_ ,
contentType: "application/json",
dataType: 'jsonp',
jsonp : "callback",
jsonpCallback: 'callbackfunc'
});
}
here is my callback function
function callbackfunc (data)
{
// parse data
// put them in the right div
}
so the parsing part is similar for all of the links ( all links are json feeds from rss ) only thing different is that div , so i need to somehow send div id along with ajax result to callback function , otherwise i have to write separate callback function for each link
something like
function callbackfunc (data , div_id)
{
// parse data
$('#'+div_id).html(data);
}