0
我想鏈接另一個HTML(nytimes.html)在這個CSS彈出框頂部的同一頁上。我怎麼做?鏈接在同一頁上的另一個html(javascript)
$('.portfolio-thumbnail').click(function(e) {
console.log(this.id); //this is how we know what to load into the frame
$('#popup-frame').fadeIn();
switch(this.id) {
case "nytimes":
//do something for nytimes
$('#popup-frame').css('background', "rgba(0, 255,0, .5)");
break;
case "eloquence":
$('#popup-frame').css('background', "rgba(255, 82, 145, .5)");
break;
default:
break;
}
});
是否要在iframe中打開鏈接?你可能想要:window.open(mylink,'popup-frame') – Aminadav
'$('#popup-frame').load('nytimes.html')'會做到這一點。 – A1rPun