First time here? Check out the FAQ!
Hello. I am integrating jquery ui and zk.
The alert function only gives me "undefined", while I actually wrote the ID in the zul page.
my javascript:
$("."+draggableDivString).draggable({
start: function(e,ui) {
alert($(ui.draggable).attr('id'));
},
drag: function() {
},
stop: function() {
},
containment:"parent"
});
Could anyone tell me how to solve this?Thanks.
You need to get the ID of the client side widget:
start: function(e, ui) {
var zkWidget = zk.$(this);
zk.log('dragged widget id: ' + zkWidget.id);
},
Here a runnable example: http://zkfiddle.org/sample/37qagib/1-jquery-ui-draggable-widget-id
Asked: 2018-12-28 14:11:20 +0800
Seen: 16 times
Last updated: Feb 14 '19
[ZK8.6 Preview] New media components coming soon!
Bug in Datebox with lenient=false and value 01.04.1981?
failed to utilize getTop(), getLeft() on div(component). Please help.
Serving zul files from a directory outside web application
zkoss issues with home page opening