i would like to add a button that will Select / unselect the text inside a div on Click using javascript ..
in example one click will select the text, next click will deselect the text and so on.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is one way to do it from this post also a question here as well.
If you want to select/deselect you can simply adjust your click handler to the following:
Example of it on jsfiddle.