I preform a function to print content of a special div in document.
function printContent(el) {
var restorepage = $("body").html();
var printcontent = $("#" + el).clone();
$("body").empty().html(printcontent);
window.print();
$("body").html(restorepage);
}
my code run correctly on desktop, but on the phone; it print all the body content! why does this happen? thanks