What is the syntax to disable text selection on a div and all of it’s sub elements. I’m using $(“#MyContent).disableSelection() to disable all of the text in the below code and it works in firefox and disable all three lines at once.
In IE explorer 9 it doesn’t work on child elements so to disable all of the text I’d have to do $(“#text1).disableSelection(), $(“#text2).disableSelection(), $(“#text3).disableSelection(). What is the syntax to disable or apply this to all children at once?
<div id="MyContent">
<div id="text1">Hello World</div>
<div id="text2">Goodbye</div>
<div id="text3">Asdf</div>
</div>
This works for me:
Demo : http://jsfiddle.net/9vLFD/4/