Created
July 19, 2017 16:57
-
-
Save neet/a574fc7468707139fca2011baafca007 to your computer and use it in GitHub Desktop.
getSelection.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on('click','.text', function(e) { | |
var selObj = window.getSelection(); | |
if ( !selObj.toString() ) { | |
//選択されていない場合の処理 | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment