What is happening is that .hide() and even .fadeOut() set an inline
style to display: none;. Inline styles overwrite styles found in the
style sheet.
You need to set your display property for the images to none in the
screen style sheet. Then in your JavaScript you need to do a .show()
to show the images and then do a .css('display', '') to remove the
inline style and use the display:none; specified in the screen style
sheet. Then in your print style sheet just set the images to display:
block;.
Of course neither situation is ideal. Now with JavaScript turned off
the images are hidden.
It would be so nice if we had standard beforeprint and afterprint events.
--
Brandon Aaron
On 11/27/06, Bernd Matzner <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm using a JQuery-based script which displays a number of elements of a
> slideshow (namely, <dd> tags containing images). The script then shows them.
> Now, while it looks nice when printing with JS turned off, I can't get the
> hidden images to display when printing. Unfortunately, no such thing as the
> onbeforeprint event exists in Firefox and Opera which I could use to display
> the images in the print layout. I have a <style media="print"..> definition,
> but even trying to check for a css property using jquery's css() function
> which is only defined in the print css doesn't change anything, neither does
> trying to force visibility by adding the "!important" declaration. Anyone
> have an idea on how to change css properties targeted for the media="print"
> scenario?
>
> Thanks,
> Bernd
> --
> View this message in context:
> http://www.nabble.com/Display-hidden-elements-in-print-layout-tf2711681.html#a7559846
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/