Wednesday, August 21, 2013

CSS ellipsis

I always have trouble remembering what CSS properties need to be set to get text-overflow: ellipsis to work.  These three seem to do the job:

text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;   

Wednesday, August 14, 2013

TouchPunch - drag and drop on mobile devices

I'm starting a project that is going to require drag and drop functionality on mobile devices.  I quickly learned that jQuery UI's wonderful .draggable() method only works with mouse events, making it useless on a tablet or phone.
As always I am not the first to have this problem, so some developers came up with TouchPunch, a small library that forwards mouse events to their touch counterparts. Simply including this library solved the problem without the need to write a single line of code. Booya.
http://touchpunch.furf.com/