keevitaja Posted January 17, 2012 Share Posted January 17, 2012 is it possible to select some text with jquery. the result should be the same, when you hold down left mouse button and drag it to copy the selection? Quote Link to comment https://forums.phpfreaks.com/topic/255253-jquery-select-text/ Share on other sites More sharing options...
AyKay47 Posted January 17, 2012 Share Posted January 17, 2012 what exactly do you mean? beyond a simple copy paste? Quote Link to comment https://forums.phpfreaks.com/topic/255253-jquery-select-text/#findComment-1308726 Share on other sites More sharing options...
keevitaja Posted January 18, 2012 Author Share Posted January 18, 2012 i want to "auto select" some text so user could just hit crtl+c like in goo.gl the url is autoselected Quote Link to comment https://forums.phpfreaks.com/topic/255253-jquery-select-text/#findComment-1308742 Share on other sites More sharing options...
Adam Posted January 19, 2012 Share Posted January 19, 2012 If you look behind the scenes, goo.gl is actually using a disguised text input to be able to select the text. Selecting text within an input isn't exactly simple, thanks mainly to all the cross-browser issues, but I should imagine you'll be able to find a jQuery plug-in to make it simple. "jCaret" seem to be the most popular, but I've never used it myself. Quote Link to comment https://forums.phpfreaks.com/topic/255253-jquery-select-text/#findComment-1309076 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.