Javascript function: find an element by text content

Here is a recursive Javascript function to find DOM element. It will recurse through all the children as of a parent that you pass it. It returns the element that contains the textval you are looking for or null.

function findByTextContent(cur, textval){
var val = cur.nodeValue;
if(val){
if(cur.nodeValue.toUpperCase().indexOf(textval.toUpperCase()) != -1){
return cur;
}
}
var el = cur.firstChild, found=0;
if(el){
found = findByTextContent(el, textval);
if(found) return found;
}
var next = cur.nextSibling;
while(next){

Implementing columns with css

Here is one of the pieces of the puzzle of the world of implementing tables and/or lining things up in columns with CSS.

The concept:
You want to display items, as if in a table. So you think that you will simply output each item, for example using a tag. One after each other until the end of the row. You are thinking that you can but a

Turkish proverb

No matter how far you've gone down the wrong road, turn back.

Thank you for visiting Metwalli

It's nice to have you on our site. If you were looking for something that you are not finding, please let us know.

  1. Metwalli family photo gallery
  2. Site web de la famille Allard-Metwalli
  3. Karim Metwalli's resume
  4. Isabelle Metwalli Soprano
Syndicate content