Version 1 (modified by Scott González, 9 years ago) (diff)

--

Please use jsFiddle or jsbin to provide test cases instead of pasting large blocks of code in the ticket.