html5 - how change image domain using jquery while page loading -
i extracting table url http://rid3201.org/site/club_members2.php?id=mtk3ng== using ajax jquery , append div. cant access images table because of different domain. how can solve problem. content extracted using following code
$.ajax( { url: '/member/downloadurldata', type: "post", datatype: "html", async: true, cache: false, beforesend: function (request) { }, success: function (data) { // $('#rdata').load('data #container'); var html = $.parsehtml(data); var table = $(html).find('#container>table:first'); $("#rdata").append(table); }, error: function (xmlhttprequest, textstatus, errorthrown) { }, complete: function (xmlhttprequest, textstatus) { } });
use code
$(document).ready(function () { $('table img').each(function () { $(this).attr("src", "http://rid3201.org/" + $(this).attr("src").replace('..', '')); }); });
working demo http://jsfiddle.net/cse_tushar/kggag/2/
Comments
Post a Comment