| Constructor Attributes | Constructor Name and Description |
|---|---|
|
REDIPS.drag Version 4.6.8.
REDIPS.drag is a JavaScript drag and drop library focused on dragging table content and table rows. |
| Field Attributes | Field Name and Description |
|---|---|
|
Animation pause (lower values means the animation will go faster).
|
|
|
Shift drop option animation.
|
|
|
Animation step (minimum is 1).
|
|
|
Border style for enabled element.
|
|
|
Border style for disabled element.
|
|
|
Bound size for triggering page autoscroll or autoscroll of scrollable DIV container.
|
|
|
If set to "true", all DIV elements on tables could be cloned with pressed SHIFT key.
|
|
|
If set to "true", table rows could be cloned with pressed SHIFT key.
|
|
|
Reference to current table cell.
|
|
|
Delete cloned DIV element if dropped outside of any table.
|
|
|
Delete shifted elements (the most right or the most left elements).
|
|
|
Property defines working types of REDIPS.drag library: multiple, single, switch, switching, overwrite and shift.
|
|
|
Hover object contains 4 properties: color_td, color_tr, border_td and border_tr.
|
|
|
Table cells marked with "mark" class name can be allowed or forbidden for accessing (with exceptions) - default is "deny".
|
|
|
Dragging mode "cell" or "row" (readonly).
|
|
|
Property defines "top" or "bottom" position of dropped element in table cell (if cell already contains DIV elements).
|
|
|
Currently moved DIV element.
|
|
|
Previously moved DIV element (before clicked or cloned).
|
|
|
Table cells marked with "only" class name can accept only defined DIV elements.
|
|
|
Opacity level for disabled elements.
|
|
|
Reference to previous table cell.
|
|
|
Color of empty row.
|
|
|
Shift elements to empty cell after DIV element is deleted (moved to the trash cell).
|
|
|
Property defines shift modes: horizontal1, horizontal2, vertical1 and vertical2.
|
|
|
Reference to source table cell.
|
|
|
Autoscroll pause in milliseconds.
|
|
|
Reference to target table cell.
|
|
|
Confirm element deletion.
|
|
|
Confirm row deletion.
|
|
|
Table cell class name where DIV elements will be deleted.
|
| Method Attributes | Method Name and Description |
|---|---|
|
clone_div(div, drag)
Method clones DIV element and returns reference of the cloned element.
|
|
|
delete_object(el)
Method deletes DIV element from table.
|
|
|
empty_cell(td)
Method removes elements from table cell.
|
|
|
enable_drag(enable_flag, el, type)
Method attaches / detaches onmousedown, ontouchstart and ondblclick events to DIV elements and attaches onscroll event to the scrollable containers in initialization phase.
|
|
|
enable_table(el)
This method can select tables by class name and mark them as enabled / disabled.
|
|
|
find_cell(param, el)
Method returns data (cell reference, row index and column index) for first or last cell in table or row / column.
|
|
|
find_parent(tag_name, el)
Method returns a reference of the required parent element.
|
|
|
get_position(ip)
Method returns position as array with members tableIndex, rowIndex and cellIndex (array length is 3).
|
|
|
get_style(el, style_name)
Method returns style value for requested HTML element and style name.
|
|
|
Method returns current page scroll position as array.
|
|
|
init(dc)
Drag container initialization.
|
|
|
move_object(ip)
Method will calculate parameters and start animation (DIV element to the destination table cell).
|
|
|
relocate(from, to, mode)
Method relocates DIV elements from source table cell to the target table cell (with optional animation).
|
|
|
row_empty(tbl_id, row_idx, color)
Method marks selected row as empty.
|
|
|
row_opacity(el, opacity, color)
Method sets opacity to table row or deletes row content.
|
|
|
save_content(tbl, type)
Method scans table content and prepares query string or JSON format for submitting to the server.
|
|
|
shift_cells(td1, td2)
Method shifts table content horizontally or vertically.
|
| Event Attributes | Event Name and Description |
|---|---|
|
myhandler_changed(current_cell)
Event handler invoked on every change of current (highlighted) table cell.
|
|
|
myhandler_clicked(current_cell)
Event handler invoked if a mouse button is pressed down while the mouse pointer is over DIV element.
|
|
|
Event handler invoked if DIV element is cloned.
|
|
|
myhandler_cloned_dropped(target_cell)
Event handler invoked after cloned DIV element is dropped.
|
|
|
Event handler invoked if last element is cloned (type 1).
|
|
|
Event handler invoked if last element is cloned (type 2).
|
|
|
Event handler invoked if a mouse button is clicked twice while the mouse pointer is over DIV element.
|
|
|
Event handler invoked if element is deleted (dropped to the "trash" table cell).
|
|
|
myhandler_dropped(target_cell)
Event handler invoked if element is dropped to the table cell.
|
|
|
Event handler invoked if mouse button is released but before element is dropped to the table cell.
|
|
|
Event handler invoked if element is moved from home position.
|
|
|
Event handler invoked if cloned element is dropped on start position or cloned element is dropped outside current table with "delete_cloned" property set to true.
|
|
|
Event handler invoked if a mouse button is pressed down and released while the mouse pointer is over DIV element (element was not actually moved).
|
|
|
myhandler_row_changed(current_cell)
Event handler invoked on every change of current (highlighted) table row.
|
|
|
myhandler_row_clicked(current_cell)
Event handler invoked if a mouse button is pressed down while the mouse pointer is over row handler (div class="drag row").
|
|
|
Event handler invoked if table row is cloned.
|
|
|
Event handler invoked if row is deleted (dropped to the "trash" table cell).
|
|
|
myhandler_row_dropped(target_cell)
Event handler invoked after row is dropped to the table cell.
|
|
|
Event handler invoked if mouse button is released but before row is dropped to the table.
|
|
|
myhandler_row_dropped_source(target_cell)
Event handler invoked if row is moved around and dropped to the home position.
|
|
|
Event handler invoked if row is moved from home position.
|
|
|
Event handler invoked if cloned row is dropped to the source row.
|
|
|
Event handler invoked if a mouse button is pressed down and released while the mouse pointer is over row handler (row was not actually moved).
|
|
|
Event handler invoked if row is undeleted.
|
|
|
myhandler_switched(target_cell)
Event handler invoked if DIV elements are switched (drop_option is set to "switch").
|
|
|
Event handler invoked if element is undeleted.
|
Field Detail
{Integer} animation_pause
Animation pause (lower values means the animation will go faster).
- Default Value:
- 20 (milliseconds)
{Boolean} animation_shift
Shift drop option animation. If set to true, table content will be relocated with animation in case of "shift" drop option.
- Default Value:
- false
{Integer} animation_step
Animation step (minimum is 1). Property defines number of pixels in each step. Higher values means bigger step (faster animation) but with less smoothness.
- Default Value:
- 2 px
{String} border
Border style for enabled element.
- Default Value:
- solid
{String} border_disabled
Border style for disabled element.
- Default Value:
- dotted
{Integer} bound
Bound size for triggering page autoscroll or autoscroll of scrollable DIV container.
- Default Value:
- 25 (px)
{Boolean} clone_shiftKey
If set to "true", all DIV elements on tables could be cloned with pressed SHIFT key. Just press SHIFT key and try to drag element. Instead of moving current element, DIV element will be cloned and ready for dragging.
- Default Value:
- false
{Boolean} clone_shiftKey_row
If set to "true", table rows could be cloned with pressed SHIFT key. Just press SHIFT key and start dragging table row. Source row will not be deleted.
- Default Value:
- false
{HTMLElement} current_cell
Reference to current table cell.
- See:
-
source_cell
previous_cell
{Boolean} delete_cloned
Delete cloned DIV element if dropped outside of any table. If property is set to "false" then cloned DIV element will be dropped to the last possible table cell.
- Default Value:
- true
{Boolean} delete_shifted
Delete shifted elements (the most right or the most left elements).
- Default Value:
- false
{String} drop_option
Property defines working types of REDIPS.drag library: multiple, single, switch, switching, overwrite and shift.
// elements can be dropped to all table cells (multiple elements in table cell) REDIPS.drag.drop_option = 'multiple'; // elements can be dropped only to the empty table cells REDIPS.drag.drop_option = 'single'; // switch content REDIPS.drag.drop_option = 'switch'; // switching content continuously REDIPS.drag.drop_option = 'switching'; // overwrite content in table cell REDIPS.drag.drop_option = 'overwrite'; // shift table content after element is dropped or moved to trash cell REDIPS.drag.drop_option = 'shift';
- Default Value:
- multiple
{Object} hover
Hover object contains 4 properties: color_td, color_tr, border_td and border_tr. color_td and color_tr defines hover color for DIV element and table row. If border_td is defined, then highlighted cell will have border. If border_tr is defined then highlighted row will have only top or bottom border. Top border shows that row will be placed above current row, while bottom border shows that current row will be placed below current row. Some browsers may have problem with "border-collapse:collapse" table style and border highlighting. In that case try without collapsing TD borders (e.g set "border-spacing:0" and smaller "td.border-width").
// set "#9BB3DA" as hover color for TD REDIPS.drag.hover.color_td = '#9BB3DA'; // or set "Lime" as hover color for TR REDIPS.drag.hover.color_tr = 'Lime'; // set red border for highlighted TD REDIPS.drag.hover.border_td = '2px solid red';
{Object} mark
Table cells marked with "mark" class name can be allowed or forbidden for accessing (with exceptions) - default is "deny". This is useful to define table cells forbidden for every DIV element with exceptions (or contrary, define table cells allowed for all DIV elements except some). Object contains:
- {String} action - allow / deny table cell (default is "deny")
- {String} cname - class name of marked cells (default is "mark")
- {Array} exception - defined DIV elements can be dropped to the table cells marked with class "mark" (DIV id -> class name)
// only element with Id "d8" can be dropped to the cell with class name "mark smile" REDIPS.drag.mark.exception.d8 = 'smile';
- See:
- only
{String} mode
Dragging mode "cell" or "row" (readonly). This is readonly property defined in a moment when DIV element or row handler is clicked.
{String} multiple_drop
Property defines "top" or "bottom" position of dropped element in table cell (if cell already contains DIV elements). It has affect only in case of drop_option="multiple".
// place dropped elements to cell top REDIPS.drag.multiple_drop = 'top';
- Default Value:
- bottom
{HTMLElement} obj
Currently moved DIV element.
{HTMLElement} obj_old
Previously moved DIV element (before clicked or cloned).
{Object} only
Table cells marked with "only" class name can accept only defined DIV elements. Object contains:
- {Array} div - defined DIV elements can be dropped only to the table cells marked with class name "only" (DIV id -> class name)
- {String} cname - class name of marked cells (default is "only")
- {String} other - allow / deny dropping DIV elements to other table cells (default is "deny")
// only element with Id "a1" can be dropped to the cell with class name "only last" REDIPS.drag.only.div.a1 = 'last'; // DIV elements mentioned in REDIPS.drag.only.div cannot be dropped to other cells REDIPS.drag.only.other = 'deny';
- See:
- mark
{Integer} opacity_disabled
Opacity level for disabled elements.
{HTMLElement} previous_cell
Reference to previous table cell.
- See:
-
source_cell
current_cell
{String} row_empty_color
Color of empty row.
- See:
- row_empty
- Default Value:
- White
{Boolean} shift_after
Shift elements to empty cell after DIV element is deleted (moved to the trash cell). If set to false, table content will not be shifted. This property will have effect only if drop_option is set to "shift".
- See:
- drop_option
- Default Value:
- true
{String} shift_option
Property defines shift modes: horizontal1, horizontal2, vertical1 and vertical2. horizontal1 - horizontal shift (element shift can affect more rows) horizontal2 - horizontal shift (each row is treated separately) vertical1 - vertical shift (element shift can affect more columns) vertical2 - vertical shift (each column is treated separately)
// DIV elements will be shifted vertically (each column is treated separately) REDIPS.drag.shift_option = 'vertical2';
- See:
- shift_cells
- Default Value:
- horizontal1
{HTMLElement} source_cell
Reference to source table cell.
{Integer} speed
Autoscroll pause in milliseconds.
- Default Value:
- 20 (milliseconds)
{HTMLElement} target_cell
Reference to target table cell. Target table cell is defined in a moment of dropping element to the table cell.
{Boolean} trash_ask
Confirm element deletion. If set to "true" popup with question: "Are you sure you want to delete?" will appear.
- Default Value:
- true
{Boolean} trash_ask_row
Confirm row deletion. If set to "true" popup with question: "Are you sure you want to delete row?" will appear.
- Default Value:
- true
{String} trash_cname
Table cell class name where DIV elements will be deleted.
- Default Value:
- trash
Method Detail
{HTMLElement} clone_div(div, drag)
Method clones DIV element and returns reference of the cloned element. "clone" class name will not be copied in cloned element (in case if source element contains "clone" class name). This method is called internally also.
- Parameters:
- {HTMLElement} div
- DIV element to clone.
- {Boolean} drag Optional
- If set to true, then cloned DIV element will be ready for dragging (otherwise element will be only cloned).
- Returns:
- {HTMLElement} Returns cloned DIV element.
delete_object(el)
Method deletes DIV element from table. Input parameter is DIV reference or id of DIV element.
// delete DIV element in myhandler_dropped() event handler
rd.myhandler_dropped = function () {
rd.delete_object(rd.obj);
}
// delete DIV element with id="d1"
rd.delete_object('d1');
- Parameters:
- {String|HTMLElement} el
- Id of DIV element or reference of DIV element that should be deleted.
{Boolean} empty_cell(td)
Method removes elements from table cell.
// set REDIPS.drag reference var rd = REDIPS.drag; // search for TABLE element (from cell reference) tbl = rd.empty_cell(td);
- Parameters:
- {HTMLElement} td
- Table cell reference from which all the elements will be deleted.
- Returns:
- {Boolean} Returns false if input element is not table cell.
enable_drag(enable_flag, el, type)
Method attaches / detaches onmousedown, ontouchstart and ondblclick events to DIV elements and attaches onscroll event to the scrollable containers in initialization phase. It also can be used for element initialization after DIV element was manually added to the table. If class attribute of DIV container contains "noautoscroll" class name then autoscroll option will be disabled.
// enable element with id="id123"
enable_drag(true, 'id123');
// or init manually added element with known id
REDIPS.drag.enable_drag(true, 'id234');
// disable all elements in drag1 subtree
enable_drag(false, 'drag1', 'subtree')
// init all DIV elements in dragging area (including newly added DIV element)
REDIPS.drag.enable_drag('init');
// init added element with known reference
REDIPS.drag.enable_drag(true, my_el);
- Parameters:
- {String|Boolean} enable_flag
- Enable / disable element (or element subtree like table, dragging container ...).
- {String|HTMLElement} el Optional
- Element id (or subtree) to enable / disable. Parameter defines element id or element reference of DIV element(s) to enable / disable.
- {String} type Optional
- Type definition for the second parameter el - element or subtree.
- See:
- enable_table
enable_table(el)
This method can select tables by class name and mark them as enabled / disabled. Instead of class name, it it possible to send table reference for enable / disable. By default, all tables are enabled to accept dropped elements.
// disable tables with class name 'mini' enable_table(false, 'mini');
- Parameters:
- {String|HTMLElement} el
- Class name of table(s) to enable/disable or table reference to enable/disable.
- See:
- enable_drag
{Array} find_cell(param, el)
Method returns data (cell reference, row index and column index) for first or last cell in table or row / column.
// find first cell in row (el is table cell reference)
firstInRow = find_cell('firstInRow', el);
// find last cell in table (el is reference of any cell inside table)
last = find_cell('last', el);
// find last cell in column (el is table cell reference)
lastInColumn = find_cell('lastInColumn', el);
- Parameters:
- {String} param
- Parameter defines first or last table cell (values are "first", "firstInColumn", "firstInRow", "last", "lastInColumn", "lastInRow").
- {HTMLElement} el
- Table cell reference (td). For "first" or "last" request, el can be any HTMLElement within table.
- Returns:
- {Array} Returns array with row index, column index and cell reference,
{HTMLElement} find_parent(tag_name, el)
Method returns a reference of the required parent element.
// find parent TABLE element (from cell reference)
tbl = find_parent('TABLE', cell);
- Parameters:
- {String} tag_name
- Tag name of parent element.
- {HTMLElement} el
- Start position to search.
- Returns:
- {HTMLElement} Returns reference of the found parent element.
{Array} get_position(ip)
Method returns position as array with members tableIndex, rowIndex and cellIndex (array length is 3). If input parameter is not defined then method will return array with current and source positions (array length will be 6).
// set REDIPS.drag reference
var rd = REDIPS.drag;
// display target and source position of dropped element
rd.myhandler_dropped = function () {
// get target and source position (method returns positions as array)
// pos[0] - target table index
// pos[1] - target row index
// pos[2] - target cell (column) index
// pos[3] - source table index
// pos[4] - source row index
// pos[5] - source cell (column) index
var pos = rd.get_position();
// display element positions
console.log(pos);
};
- Parameters:
- {String|HTMLElement} ip Optional
- DIV element id / reference or table cell id / reference.
- Returns:
- {Array} Returns array with members tableIndex, rowIndex and cellIndex.
{String} get_style(el, style_name)
Method returns style value for requested HTML element and style name.
- Parameters:
- {HTMLElement} el
- Requested HTML element.
- {String} style_name
- Asked style name.
- Returns:
- {String} Returns style value.
{Array} getScrollPosition()
Method returns current page scroll position as array.
- Returns:
- {Array} Returns array with two members [ scrollX, scrollY ].
init(dc)
Drag container initialization. It should be called at least once (it is possible to call a method multiple times). Every page should have at least one drag container. If REDIPS.drag.init() is called without input parameter, library will search for drag container with id="drag". Only tables inside drag container will be scanned. It is possible to have several drag containers totaly separated (elements from one container will not be visible to other drag containers).
// init drag container (with default id="drag")
REDIPS.drag.init();
// init drag container with id="drag1"
REDIPS.drag.init('drag1');
- Parameters:
- {String} dc Optional
- Drag container Id (default id "drag").
{Array} move_object(ip)
Method will calculate parameters and start animation (DIV element to the destination table cell). If "target" property is not defined then current location will be used. Here is properties definition of input parameter:
- {String} id - id of element to animate - DIV element or row handler (div class="drag row")
- {String} obj - reference of element to animate - DIV element or row handler (if "id" parameter exists, "obj" parameter will be ignored)
- {String} mode - animation mode (if mode="row" then source and target properties should be defined)
- {Array} source - source position (table index and row index)
- {Array} target - target position (table, row and cell index (optional for "row" mode)
- {Function} callback - callback function executed after animation is finished
Method returns array containing reference of two object. In "cell" mode returned objects are:
- Array[0] - dragged element
- Array[1] - dragged element
In "row" mode returned objects are:
- Array[0] - table_mini
- Array[1] - source row
// move element with id="a1" to the current location and after
// animation is finished display alert "Finished"
rd.move_object({
id: 'a1',
callback: function () {
alert('Finished');
}
});
// move element with id="a2" to the first table, second row and third cell
rd.move_object({
id: 'a2',
target: [0, 1, 2]
});
// move DIV element with reference "mydiv" to the first table, second row and third cell
rd.move_object({
obj: mydiv,
target: [0, 1, 2]
});
// move first row and after animation is finished call "enable_button" function
// "move_object" returns Array with references of table_mini and source row
row = rd.move_object({
mode: 'row', // animation mode - row
source: [0, 0], // source position (table index and row index)
target: [0, 6], // target position
callback: enable_button // function to call after animation is over
});
- Parameters:
- {Object} ip
- Object with properties: id, mode, source, target and callback.
- Returns:
- {Array} Returns reference of two elements in array. In "cell" mode both elements are dragged element, while in "row" mode first element is table_mini and second element is source row.
relocate(from, to, mode)
Method relocates DIV elements from source table cell to the target table cell (with optional animation). If animation is enabled, then target table will be disabled until animated element reaches destination cell.
- Parameters:
- {HTMLElement} from
- Source table cell.
- {HTMLElement} to
- Target table cell.
- {String} mode Optional
- Relocation mode "instant" or "animation". Default is "instant".
row_empty(tbl_id, row_idx, color)
Method marks selected row as empty. Could be needed for displaying initially empty table. Input parameters are table id and row index.
// set reference to the REDIPS.drag library
rd = REDIPS.drag;
// mark first row as empty in table with id="tbl1"
rd.row_empty('tbl1', 0);
- Parameters:
- {String} tbl_id
- Table id.
- {Integer} row_idx
- Row index (starts from 0).
- {String} color Optional
- Color of empty row (default is "White" or defined with REDIPS.drag.row_empty_color parameter).
- See:
- row_empty_color
row_opacity(el, opacity, color)
Method sets opacity to table row or deletes row content. Input parameter "el" is reference to the table row or reference to the cloned mini table (when row is moved).
// set reference to the REDIPS.drag library rd = REDIPS.drag; // make row semi-transparent rd.row_opacity(row_obj, 50); // set row as empty and white (content in table cells will be deleted) rd.row_opacity(row_obj, 'empty', 'White');
- Parameters:
- {HTMLElement|String} el
- Id of row handler (div class="drag row") or reference to element (source row or mini table).
- {Integer|String} opacity
- Opacity level (from 0 to 100) or "empty" (then content of table cells in row will be deleted - in that case first parameter should be TR).
- {String} color Optional
- Background color.
save_content(tbl, type)
Method scans table content and prepares query string or JSON format for submitting to the server. Input parameters are id / table reference and optional output format.
Query string: 'p[]='+id+'_'+r+'_'+c+'&p[]='+id+'_'+r+'_'+c + ... JSON: [["id",r,c],["id",r,c],...] id - element id r - row index c - cell index Query string example: p[]=d1_1_0&p[]=d2_1_1&p[]=d3_5_2&p[]=d4_5_3 JSON example: [["d1",1,0],["d2",1,1],["d3",5,2],["d4",5,3]]
- Parameters:
- {String|HTMLElement} tbl
- Id or reference of table that will be scanned.
- {String} type Optional
- Type defines output format. If set to "json" then output will be JSON format otherwise output will be query string.
shift_cells(td1, td2)
Method shifts table content horizontally or vertically. REDIPS.drag.shift_option defines the way of how content will be shifted. Useful for sorting table content in any direction.
// define first and last table cell
var firstCell = document.getElementById('firstCellOnTable'),
lastCell = document.getElementById('lastCellOnTable');
// enable animation
REDIPS.drag.animation_shift = true;
// shift content
REDIPS.drag.shift_cells(lastCell, firstCell);
- Parameters:
- {HTMLElement} td1
- Source table cell.
- {HTMLElement} td2
- Target table cell.
- See:
- shift_option
Event Detail
myhandler_changed(current_cell)
Event handler invoked on every change of current (highlighted) table cell.
// set REDIPS.drag reference
var rd = REDIPS.drag;
// define myhandler_changed event handler
rd.myhandler_changed = function () {
// get current position (method returns positions as array)
var pos = rd.get_position();
// display current row and current cell
console.log('Changed: ' + pos[1] + ' ' + pos[2]);
};
- Parameters:
- {HTMLElement} current_cell Optional
- Reference to the current (highlighted) table cell.
- See:
- get_position
myhandler_clicked(current_cell)
Event handler invoked if a mouse button is pressed down while the mouse pointer is over DIV element.
- Parameters:
- {HTMLElement} current_cell Optional
- Reference to the table cell of clicked element.
myhandler_cloned()
Event handler invoked if DIV element is cloned.
myhandler_cloned_dropped(target_cell)
Event handler invoked after cloned DIV element is dropped.
- Parameters:
- {HTMLElement} target_cell Optional
- Reference to the target table cell.
myhandler_clonedend1()
Event handler invoked if last element is cloned (type 1). Element has defined "climit1_X" class name where X defines number of elements to clone. Last element can be dragged.
myhandler_clonedend2()
Event handler invoked if last element is cloned (type 2). Element has defined "climit2_X" class name where X defines number of elements to clone. Last element can't be dragged and stays static.
myhandler_dblclicked()
Event handler invoked if a mouse button is clicked twice while the mouse pointer is over DIV element.
myhandler_deleted()
Event handler invoked if element is deleted (dropped to the "trash" table cell).
myhandler_dropped(target_cell)
Event handler invoked if element is dropped to the table cell.
- Parameters:
- {HTMLElement} target_cell Optional
- Reference to the target table cell.
myhandler_dropped_before()
Event handler invoked if mouse button is released but before element is dropped to the table cell. If boolen "false" is returned from event handler then element drop will be canceled. Dragged element will be returned to the start position while cloned element will be deleted.
myhandler_moved()
Event handler invoked if element is moved from home position.
myhandler_notcloned()
Event handler invoked if cloned element is dropped on start position or cloned element is dropped outside current table with "delete_cloned" property set to true. This event handler could be also invoked if "clone" type element is placed inside forbidden table cell.
- See:
- delete_cloned
myhandler_notmoved()
Event handler invoked if a mouse button is pressed down and released while the mouse pointer is over DIV element (element was not actually moved).
myhandler_row_changed(current_cell)
Event handler invoked on every change of current (highlighted) table row.
- Parameters:
- {HTMLElement} current_cell Optional
- Reference to the current (highlighted) table cell.
myhandler_row_clicked(current_cell)
Event handler invoked if a mouse button is pressed down while the mouse pointer is over row handler (div class="drag row").
- Parameters:
- {HTMLElement} current_cell Optional
- Reference to the table cell of clicked element.
myhandler_row_cloned()
Event handler invoked if table row is cloned.
myhandler_row_deleted()
Event handler invoked if row is deleted (dropped to the "trash" table cell).
myhandler_row_dropped(target_cell)
Event handler invoked after row is dropped to the table cell.
- Parameters:
- {HTMLElement} target_cell Optional
- Reference to the target table cell.
myhandler_row_dropped_before()
Event handler invoked if mouse button is released but before row is dropped to the table. If boolen "false" is returned from event handler then row drop will be canceled.
myhandler_row_dropped_source(target_cell)
Event handler invoked if row is moved around and dropped to the home position.
- Parameters:
- {HTMLElement} target_cell Optional
- Reference to the target table cell.
myhandler_row_moved()
Event handler invoked if row is moved from home position.
myhandler_row_notcloned()
Event handler invoked if cloned row is dropped to the source row.
myhandler_row_notmoved()
Event handler invoked if a mouse button is pressed down and released while the mouse pointer is over row handler (row was not actually moved).
myhandler_row_undeleted()
Event handler invoked if row is undeleted. After row is dropped to the "trash" table cell and "trash_ask_row" property is set to true then popup with question: "Are you sure you want to delete row?" will appear. Clicking on "Cancel" will undelete row and call this event handler.
- See:
- trask_ask_row
myhandler_switched(target_cell)
Event handler invoked if DIV elements are switched (drop_option is set to "switch").
- Parameters:
- {HTMLElement} target_cell Optional
- Reference to the target table cell.
- See:
- drop_option
myhandler_undeleted()
Event handler invoked if element is undeleted. After element is dropped to the "trash" table cell and "trash_ask" property is set to true then popup with question: "Are you sure you want to delete?" will appear. Clicking on "Cancel" will undelete element and call this event handler.
- See:
- trask_ask

Thank you for the quick reply. I look forward to the column drag and drop, that will be quite something! As for the second question I managed to get the drag functionality working as I expected, I was just trying to ensure that cells from one table could not be dragged into another table within the same DIV drag container.
Anthony - I'm glad you find a solution and dragging works as expected. Cheers!