简体   繁体   中英

Yii and jQueryUI Sortable - can't drag

$sortableItems = $option->getSortableItems();

$this->widget('zii.widgets.jui.CJuiSortable',
              array(
                    'id'=>'order',
                    'items'=>$sortableItems,
                    'itemTemplate'=>'<li id="{id}" class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>{content}</li>',                                
));

The widget runs and looks fine in the page. However, when I go drag and drop, many <li class="ui-state-default ui-sortable-placeholder" style="visibility: hidden;"/> are created between two elements and the items don't change their positions.

Does someone know what is happening?

Due to the error oddity, it seems that you are having a jqueryUI library conflict. Try to see on your view how many scripts are loading and perhaps the issue may be gone.

:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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