Asking selectivizer to parse newly added DOM elements

80 views
Skip to first unread message

aproximation

unread,
Apr 25, 2011, 12:29:33 PM4/25/11
to selectivizr
I've tried using similar tools in the past, and they work, with
varying speeds, but when I dynamically add DOM elements the IE classes
selectors need to be regenerated.

Question 1: what is the fastest tool to cause IE to recognize CSS3
sleectors (iecss3, slectivizer, etc)

Question 2: once the DOM has been modified is there a call I can make
that would re-parse some peice of the DOM to cause IE to correctly
render that set?

For example, say you have a list:
<ul><li>one</li><li>two</li></ul>
and the styles
ul li:nth-child(2n+1) { color:red; }
then, using javascript, add another li element
$(window).bind("load", function(e) { $("ul").append("<li>three</
li>"); });

in the past, that third element doesn't render correctly (have the
right classes attached)

It would be useful to have a call like
selectivizer.reparse($(ul)[0]);

It would be more useful to pop-up a meessage like this...
if ($.browser.msie) { alert("please, don't use IE"); }
But alas, my work won't let me do that... ~;)

Thanks,
-wade
Reply all
Reply to author
Forward
0 new messages