jQuery UI event and ui object properties

后端 未结 2 567
鱼传尺愫
鱼传尺愫 2020-12-24 00:54

In the jQuery UI framework for Interactions you can do custom functions and they take two parameters \'event\' and \'ui\'. I know it has to be obvious somewhere but I canno

相关标签:
2条回答
  • 2020-12-24 01:42

    this is a link for the event object http://api.jquery.com/category/events/event-object/

    for UI object it depends on the UI that you are using check this http://docs.jquery.com/UI/

    0 讨论(0)
  • 2020-12-24 01:46

    The documentation is always a good place to start, for instance the stuff you find in the ui object for draggable is available here: http://jqueryui.com/demos/draggable/. The event object is always the original event that is fired, while the ui object contains information added by jQuery UI.

    If you want you can also do your own digging. Using console.log on Firefox with the Firebug and Firequery add-ons, you can look at the insides of both objects. For instance, with this code:

    $('#test').draggable({
        start: function(event, ui){
            console.log(event);
            console.log(ui);
        }
    });
    

    The ui object looks like:

    alt text

    0 讨论(0)
提交回复
热议问题