Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/452.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jquery draggable stop能否获取对象属性数据上的stopped-*_Javascript_Jquery_Html_Jquery Ui - Fatal编程技术网

Javascript jquery draggable stop能否获取对象属性数据上的stopped-*

Javascript jquery draggable stop能否获取对象属性数据上的stopped-*,javascript,jquery,html,jquery-ui,Javascript,Jquery,Html,Jquery Ui,这是可拖动停止事件的jquery问题 我正在尝试获取发生“停止”的表格单元格 就像这里: stop: function(event, ui) { var el = allElementsFromPoint(event.pageX, event.pageY); var tablecell = $(el).filter('td').not($(this)); tablecellStartDate = tablecell.data-start; } html只是

这是可拖动停止事件的jquery问题

我正在尝试获取发生“停止”的表格单元格

就像这里:

 stop: function(event, ui) {

     var el = allElementsFromPoint(event.pageX, event.pageY);
     var tablecell = $(el).filter('td').not($(this));

     tablecellStartDate = tablecell.data-start;
}
html只是

<td data-start="2014-1-25"></td>

不能以这种方式访问元素属性。您可以使用
tablecell.attr('data-start')
tablecell.data('start')

tablecell.css({'backgroundColor': 'yellow'});