2

I'm trying to learn jquery and rummaging through jquery's documentation is not fun for a newbie.

I can't find any documentation on the "ui" parameter for sortables and their start() event handling function. The two params: event and ui. Where are the documentations that show detail of what the ui parameter does/has? What does ui.item show? ui.item.data?

The following link offers a little help but not enough detail.

What are event and UI parameters in Dialog

The link above states: "The ui parameter is typically a hash; its properties depend on the event being raised. For the dialog open event, both arguments appear to be null. For other events, such as dragStart, drag and dragStop, ui will contain the current position and offset"

So if the contents of ui parameter is dependent on the event being raised, where are the documentations that show this?

1 Answer 1

1

Here is a page that I reference almost daily:

http://jqueryui.com/demos/

More specifically for sortable: http://jqueryui.com/demos/sortable/

The tabs below the examples explain all their is to know about the options, events and methods. The overview tab explains a little bit about what is in the ui and event objects that are passed back to the start event.

Also, here is a page that explains better what the jquery event object has and links to more info about the properties:

http://api.jquery.com/category/events/event-object/

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. It's right there on the overview tab describing what the ui param is. Now i feel stupid.
No worries, we all learn this way. Good luck with it in the future

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.