All browsers provide some way to look at style sheet rules using javascript and insert new rules dynamically. IE usually returns "unknown" for something that is not supported, for example; a div p:first-child will change to div p:unknown , and a pa[href] will be returned as "UNKNOWN" in general. Fortunately, IE will find out: hover over something familiar and leave it alone.
IE also supports the so-called behaviors ; as predefined functionality, such as dynamic loading of content, as well as persistent data storage, as well as custom types of behavior that can be embedded in a .htc or .hta file. These behaviors are associated with html nodes via css and "improve" the nodes that are selected using the rule selector with the given behavior.
Comparing the above, it should be possible to create a bahavior that looks for styles for rules that IE does not support, and tricks the affected elements into applying related styles in a different way. The steps involved with this are something like:
Searching for all stylesheets for: IE does not support hover rules, Insert a new rule that IE supports, for example, with class names, and finally configure script events to switch class names. Thus: hover ,: active and: focus can be supported, and the developer does not need to do anything except behavior. Everything else works completely automatically.
Unlike versions 1 and 2, version 3 also supports dynamically added html (ajax). The difference is that 1 and 2 actively searched for the affected elements when the page loaded (so, only once), while 3 uses expressions to allow nodes to call back.
Learn more about this here.
Luis
source share