JQuery Easyui (2) droppable (placement) component

Source: Internet
Author: User

The so-called placement, is to put an object into an object, of course, for Easyui to trigger a variety of effects is necessary, and this component will not depend on other components.

How to load droppable

1,class loading has always been less like the loading of class mode wasted a place, the code is still looking at a mess.

1 <div id='dd'class="easyui-droppable" data-options="Accept: ' #box, #pox '"></div>

2,JS Load Call

$ ("#box"). Droppable ({    Accept:' #pox ',         // place element pox in the element box });    

Properties of the Droppable

1,accept defaults to NULL to determine which elements are accepted, that is, the element can be placed

$ ("#box"). Droppable ({    Accept:' #pox ',         // place element pox in the element box });   

2,deisabled default is False if true, prevents placement of the

$ ("#box"). Droppable ({    Accept:' #pox ',         // place element pox in the element box    True ,        // prohibit placement });

Droppable Event List

1,ondragenter is triggered when the element is dragged into the drop zone.

2,ondragover is triggered when the dragged element passes through the drop zone.

3,ondragleave is triggered when the dragged element leaves the drop zone.

4,ondrop is triggered when the dragged element is placed into the drop zone

1 ondragenter/ondragover/ondragleave/ondrop:function (e,source) {2     //Source Parameter get DOM element 3 }

Droppable Method List

1,options returning a Property object

Console.log ($ (' #box '). droppable (' options '));

The functionality of the 2,enable,disable and above properties is the same as enabling and preventing placement

$ (' #box '). Droppable (' enable/disable ')

Easyui 1.3.5 droppable The end of the matter.

Look at the PDF when I feel particularly wrong, the original is a PDF typo, really pit--

JQuery Easyui (2) droppable (placement) component

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.