jeudi 12 février 2015

how to hide download button from print page


i have a simple print script but it also print my download button


my print button is hide on print page

but my download button isnt

how can i hide my download button ?



extra info Wordpress 4.1 (core)

Print Button Shortcode (plugin)



<?php add_shortcode("print-button", "sc_show_print_button");

function sc_show_print_button($atts, $content = null){

$target_element = $atts['target'];
$target_element1 = $atts['target1'];

if($target_element == ''){$target_element = "document.body";}

$output = "<input id='dontprint' type='button' onClick='return pop_print()' value='Print Curriculum Vitae'/>


<script type='text/javascript'>
function pop_print(){
w=window.open(null, 'Print_Page', 'scrollbars=yes');
var printButton = document.getElementById('dontprint');
printButton.style.visibility = 'hidden';
w.document.write(jQuery('$target_element').html());
w.document.write(jQuery('$target_element1').html());
w.document.close();
w.print();
}
</script>";
return $output;
}


?>




Aucun commentaire:

Enregistrer un commentaire