JSFiddle - React, Tailwind, and code Playground
by exe1
HTML
<h1>Cross Domain Test</h1>
baltictv.net:
<img style="width:100px;height:144px;" src="http://core.baltictv.net/img/movies/1/1/7/676.jpg"/>
<- CLICK ME
<br/><br/>
rodnoe.tv:
<img style="width:100px;height:144px" src="http://core.rodnoe.tv/img/movies/1/1/7/676.jpg"/> <- CLICK ME
<br/><br/>
ozo.tv:
<img style="width:100px;height:144px" src="http://core.ozo.tv/img/movies/1/1/7/676.jpg"/> <- CLICK ME
<br/><br/>
tv-over.net:
<img style="width:100px;height:144px" src="http://core.tv-over.net/img/movies/1/1/7/676.jpg"/> <- CLICK ME
JavaScript
$(document).ready(function(){
$("img").click(function(){
var url = $(this).attr("src");
event.preventDefault();
event.stopPropagation();
window.open(url, '_blank');
}).error(function() {
alert("error");
$(this).css("border","3px solid red");
});
$('img').each(function(idx,item){
if( 0 == item.naturalHeight )
$(this).css("border","3px solid red");
});
});