에서 요소의 위치를 얻기 위해, 나는 다음과 같은 노력하고있어 :어떻게 실시간
html div
id: 'square';
script: (html jQuery new draggable
onStop: (html jQuery ajax
callback: [Transcript show: html jQuery this position])).
것은 불행히도 작동하지 않는, 성적 증명서 쇼 : 'JQueryInstance ($ (this) .position())'
이 작업을 수행하는 올바른 방법은 무엇입니까? 코드, HTML jQuery를이 위치는이 문서에 기록되지 않기 때문에 클라이언트에 도달하지 스크립트 텍스트로 평가됩니다에서
html div
id: 'square';
script: (html jQuery this draggable
onDrag: ((html jQuery script:
[:builder | builder << (builder jQuery get
callback: [ :value | Transcript show: (value at: 'top')@(value at: 'left')]
json: (builder jQuery this position)).
]) asFunction: #(event ui)
:
무엇을 만들려고합니까? ^^ –
몇 가지 객체를 대화식으로 드래그 할 수있게하려고 노력 중이며 몇 가지 다른 접근 방식을 점검 할 것입니다. 첫 번째는 JQuery이지만 JQuery가 충분히 자연스럽지 않은 경우 SVG를 시도해 볼 수도 있습니다. –