following my question here, I have been trying to write a similar bit of code in Javascript that would detect a range of Unicode characters occurring in the text from nested CSS classes. So far, I was able to make it work on DIV Classes, for instance:
$(document).ready(function() {
$('h2.ClassName').each(function(index, DOMElement){
if(/[\uE000-\uF8FF]+/.test($(DOMElement).text())) {
$(this).removeClass('ClassName').addClass('CSS-ClassName');
}
})
});
However, a similar Javascript does not work on the following classes:
<ul>
<h4 class="ClassName">Text</h4>
<li class="ClassName">Text</li>
<ul>
Any idea?
Thanks indeed,
Regards,
I.