css media types and jQuery?

css media types and jQuery?

Hi,

does anyone know of a way of finding out (in jQuery) the CSS media type that the current page is rendered to?

I've got a site with different external stylesheets for screen and print and I'm using jQuery for enhancing some pages in certain ways, i.e. using jCarousel on some.
For the print-style, I want a much simpler layout with no dependency whatsoever on Javascript (since Javascript-Changes to a page seem to be rendered differently – if at all – on different browsers). My solution at the moment, is to override all changes that the jCarousel-script does to the output via "!important"-CSS rules. This works, but it hardly seems to be an ideal solution.

Is there a way, I can tell portions of my jQuery-code to only run on a certain output-medium – i.e. "screen"? In the same way that I use completely different ways to style my pages for screen and print (and maybe outher media). In that case, I could bypass the initialisation of jCarousel on "print" altogether ...

Some kind of advanced selector perhaps? I didn't find anything in the docs, though ...

Any advice would be appreciated, thanks in advance.

16tons