jQuery 'ui.element가 정의되지 않은'오류를받는 이유는 무엇입니까?
-
19-09-2019 - |
문제
나는 다음과 같습니다.
$('#widgets ul').sortable(
{
connectWith: ['#widgets ul'],
opacity: 0.7,
start: function(e, ui) {
fromWidgetPosition = ui.item.prevAll().length + 1;
fromRowId = ui.element.attr('id');
방금 jQuery를 1.2.6에서 1.3.2로 업그레이드했으며 jQuery UI 라이브러리를 최신 버전으로 업그레이드했습니다.
해결책
'요소'는 새로운 jQuery UI 버전으로 제거되었습니다. 버그 보고서 그리고 해당 소스 변경 사항.
그것에 따르면, 당신은 사용해야합니다 $(this)
대신에:
fromRowId = $(this).attr('id');
제휴하지 않습니다 StackOverflow