У меня есть эта страница предложения: http://www.becreativeagencja.com/elplast-wp/offer/hvac/
Вкл. :hover
у ящиков с предлагаемыми предметами есть возможность распечатать, однако кажется, что я не могу вывести их на документ.
Вот мой JS:
$(".print").click(function() {
var mywindow = window.open('', 'PRINT', 'height=400,width=600');
mywindow.document.write('<html><head><title>' + document.title + '</title>');
mywindow.document.write('</head><body >');
$title = $(this).parent().parent().parent().parent().parent().find("h3").text();
$bgimg = $(this).parent().parent().parent().css("background-image");
$img = "<img src='$bgimg' width='100%'/>";
mywindow.document.write('<h1>' + $title + '</h1>');
mywindow.document.write($img);
mywindow.document.write('</body></html>');
mywindow.document.close(); // necessary for IE >= 10
mywindow.focus(); // necessary for IE >= 10*/
mywindow.print();
mywindow.close();
return true;
});
Как мне достичь результата?Background-image
прикреплен к .relative-wrapper