how to detect text selection from a text search using the browsers Ctrl+F.
for example i want to make a FAQ, where are the items are closed (to remove clutter), and clicking them opens the text within them, but at the same time i dont want Ctrl+F to be killed off. So im thinking, is there a way for javascript to detect that i have searched for some text within a non visible (but selectable) block of text, and to automatically open it.
so is it even possible to detect text selection from a search with Ctrl+F? if it is, then how?
edit: ok for example i have a div with the id of "one" and a div with the id of "two" both have their own text
<div id="one">Google is a search engine</div>
<div id="two">Stackoverflow users are very informative</div>
both have their text hidden from view but still selectable, but not by mouse (using margins or covering)
so a user searches for "Stackoverflow" on this page, i want to trigger a javascript function upon the search selection (how??), and i need the function that runs to know which div, with what ID has some text selected.
i hope its clearer now :S