jQuery Input Text Selection Toggler demo

Instructions

  1. Click in the input text and all of the content should be highlighted
  2. Click again to deselect all text
  3. Click and drag to select multiple characters
  4. Click back in to clear the selection
  5. Exiting the input field should clear any selections (native browser behaviour, plus resets the data attribute)

(Yes - this is the world's most boring demo!)