By Benjamin Joffe
Wednesday, 31. October 2007, 11:59:09
Media Query library
Created by Opera's Benjamin Joffe, this rather useful little library allows you to detect the media capabilities of the browser/device setup being used to view your site.
( Read the article )
By mr7clay
Thursday, 1. November 2007, 21:25:27

This might be more useful if it returned null in the case that media queries don't seem to be supported. I imagine general MQ support could be roughly tested by a generally always-pass query like "(color)". If (color) fails, return null, o/w continue w/ test.
Also, if null is returned, the function should probably overwrite itself to always return null, in case it's called more than once;
By jmudya
Thursday, 15. November 2007, 11:20:50

For some reason for me nothing turns out. (var handheld = testMediaQuery(handheld)

--- var test = testMediaQuery(tv and (max-height: 400px)); Does can I that not so do that?
By Benjamin Joffe
Thursday, 15. November 2007, 17:11:25

mr7clay: You have a very good idea there, I plan to implement it in the next version, thank you!
By Benjamin Joffe
Thursday, 15. November 2007, 17:11:56

jmudya: Hi, it looks to me like you simply forgot to put quotation marks around your argument. For instance try this:
var handheld = testMediaQuery(
"handheld
");
var test = testMediaQuery(
"tv and (max-height: 400px)
");