简体   繁体   English

如何使用jQuery mobile添加可拖放事件侦听器?

[英]How can I add draggable and droppable event listeners with jQuery mobile?

I'm using jQuery mobile to build a mobile version of my site. 我正在使用jQuery mobile构建网站的移动版本。

A lot of the features rely on drag/drop. 许多功能都依赖于拖放。

Since jQuery mobile uses Ajax to load the pages, the event handlers for draggable and droppable aren't added to elements on any page except the first. 由于jQuery mobile使用Ajax加载页面,因此可拖动和可拖放的事件处理程序不会添加到除第一页之外的任何页面上的元素。

How can I work around this without using in-line JS 如何不使用内联JS来解决此问题

在页面容器div中添加对自定义JavaScript文件的引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM