• Hi

    Im trying to add print button to lightbox.

    Added this code to jquery.fancybox-1.3.5.pack.js

    function PrintElem(elem)
        {
            Popup($(elem).html());
        }
    
        function Popup(data)
        {
            var mywindow = window.open('', 'my div', 'height=400,width=600');
            mywindow.document.write('<html><head><title>my div</title>');
            /*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
            mywindow.document.write('</head><body >');
            mywindow.document.write(data);
            mywindow.document.write('</body></html>');
    
            mywindow.print();
            mywindow.close();
    
            return true;
        }

    And <input type=”button” value=”Print Div” onclick=”PrintElem(“#fancybox-content”)” />

    This displays print button on lightbox image but after click nothing happens. Im trying to fins solution but it seems im going nowhere.

    http://wordpress.org/plugins/easy-fancybox/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘lightbox print’ is closed to new replies.