javascript cannot catch id of zul component. Please help.

asked 2018-12-28 14:11:20 +0800

cindy951357 gravatar image cindy951357
3 2

updated 2019-02-14 18:43:09 +0800

cor3000 gravatar image cor3000
6280 2 7

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:


    start: function(e,ui) {
    drag: function() {

    stop: function() {


Could anyone tell me how to solve this?Thanks.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-14 19:15:08 +0800

cor3000 gravatar image cor3000
6280 2 7

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

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2018-12-28 14:11:20 +0800

Seen: 16 times

Last updated: Feb 14 '19

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More