¡@

Home 

2014/10/16 ¤W¤È 12:08:42

jquery Programming Glossary: someimg.jpg

jQuery recursively remove empty children

http://stackoverflow.com/questions/13069947/jquery-recursively-remove-empty-children

text. Example div id mydiv span span span br span span span br span span span span br span span span span span img src someimg.jpg width 100 height 100 span span some text span div So i want spans with images and text to stay and others leave. I need.. spans with images and text to stay and others leave. I need that result after my function div id mydiv span img src someimg.jpg width 100 height 100 span span some text span div I figured out this is to be done recursively either by JavaScript or jQuery.. is small. If i have code like this div id mydiv span br Some text span span span br span span span span span img src someimg.jpg width 100 height 100 span span some text span div I assume it to result in div id mydiv span Some text span span img src..