jQueryPlugins icon indicating copy to clipboard operation
jQueryPlugins copied to clipboard

Problem printing more than one element on Firefox

Open hudony opened this issue 13 years ago • 0 comments

Using firefox 7.0.1 and I'm trying to print multiple element (img tag) from within a loop but only the first one get printed and the iteration stops. In IE, it seems to work.

Here is the relevant code :

[code]

$('#printImage').click(function() { $("link[media='print']").attr("href", "/css/print.css"); pdfFileNameLst = new Array();

        $('img[id^="pdfToPrint"]').each(function(index) {
            a = $(this).attr("id").split("_");
            pdfFileNameLst[index] = a[1];
        });

        pdfFileNameLst = pdfFileNameLst.sort();

        for (i=0; i<pdfFileNameLst.length; i++) {
            $("#pdfToPrint_" + pdfFileNameLst[i]).printElement();              
        }

   });

[/code]

hudony avatar Oct 04 '11 20:10 hudony