您好我正在尝试拖放,问题是JQuery没有抓住ng-repeat
元素。如果我静态地添加项目它可以工作,但如果项目从循环中出来它就不再有效。
index.js
<div ng-repeat="list in lists">
<div class="column">
<div class="portlet">
<div class="portlet-header">Feeds</div>
<div class="portlet-content">Lorem ipsum dolor sit amet, consectetuer adipiscing elit</div>
</div>
</div>
</div>
<div class="column">
<div class="portlet">
<div class="portlet-header">Feeds</div>
<div class="portlet-content">Lorem ipsum dolor sit amet, consectetuer adipiscing elit</div>
</div>
</div>
<script src="/javascripts/draganddrop.js"></script>
</body>
</html>
拖放脚本:
https://gist.github.com/anonymous/a571165b46a1a86a6ec34adabe1f928f