Deepa Thalikar Deepa Thalikar - 1 year ago 106
jQuery Question

Highlighting table cells on mouse drag

I am new to Javascript/JQuery. I want to know how I could modify table cell highlighting shown here http://jsfiddle.net/Brv6J/ with a modification that will allow selection in a square pattern.

For example, consider

A, B, C, D, G, H
and
I
as table cells. Dragging the mouse along the diagonal from A to E should select cells
A,B,D & E


A B C
D E F
G H I

Ner Ner
Answer Source

For more user friendly in selecting calendar cells, I recommend this one eHighLight Plugin. A very easy and tiny plugin for document element high lighting

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download