According to
this blog post[
^], support for the
setExpression
method was dropped in IE8.
It
should work in IE7 mode or Quirks mode, but there's no guarantee that it hasn't been silently disabled in all modes by a later version of IE.
For
some properties, you can use
the standards-compliant calc()
syntax[
^]. But that won't work in anything below IE9 mode.
Depending on your markup, you might be able to use
the :checked
pseudo class[
^] to toggle the elements. But again, that won't work in anything below IE9.
Creating a toggle feature using :checked pseudo class. | Clearleft[
^]
Toggle Div visibility on click using CSS checkbox:checked[
^]
If you really need to support such ancient browsers, then your only choice is to abandon the obsolete "expression" syntax, and use Javascript.