HTML :
<button id="hide_some_text">Hide</button>
<div id="first">my name is Sea Mist and iam 19 years old</div>
<div id="second" style="display: none">This is the hidden text to be printed and selected only when button is pressed</div>
JQUERY :
$("#hide_some_text").click(function(){
$("#second").toggle();
});
What i want :
If text under div tag “second” is visible only then it should be SELECTED and PRINTABLE
(PLZ note im working in IE) , if text under div tag “second” is hidden then it should not get SELECTED when i do a Ctrl+A -> Ctrl + V and also should not be displayed when i go for Print Preview
Note : im using IE , these problems dont occur in mozzila or chrome , but due to constraints i have to use IE so i need a IE specific solution
Do something like this in your JavaScript: