 |
.select() | jQuery API Documentation
Now when any portion of the text is selected, the alert is displayed. Merely setting the location of the insertion point will not trigger the event. To trigger the event manually, apply .select() without an argument:
api.jquery.com |
 |