私はfirebugからこのエラーを受け取ります
$(this).data("ui-draggable") undefined
draggable.js jquery ファイルのこの行:
var t = $("body"), o = $(this).data("ui-draggable").options;
私は何をすべきか分かりません: ここに私の非常に単純なコードがあります:
<?echo HTML::script('assets/scripts/jquery.ui.draggable.js'),PHP_EOL ?>
<div id="draggable"></div>
css:
#draggable{
background-color: white;
width: 107px !important;
height: 52px !important;
border: 1px solid rgb(190, 190, 190);
margin-top : -7px;
margin-top: -10px;
font-size:11px;
text-align:center;
}
とjs:
$(function() {
$("#draggable").draggable();
});
スクリプトをロードする行は kohanna の php フレームワークから来ており、完全に機能します。これより前にロードされた他のjqueryウィジェットを使用していますが、それらは完全に機能します。
何か案が ?ありがとうございました !
編集: - UI が前に適切に追加されます。そうしないと、他の jquery ウィジェットが機能せず、draggable.js ファイルも適切に追加されます - コンソールでチェックインすると、これは私の div を参照します: #draggable
編集2:
<?echo HTML::script('http://s3.amazonaws.com/imgs3.plinga.de/general/shop/plingaShop.js'),PHP_EOL ?>
<?echo HTML::script('assets/scripts/jquery.multiselect.min.js'),PHP_EOL ?>
<?echo HTML::script('assets/scripts/jquery.multiselect.filter.min.js'),PHP_EOL ?>
<?echo HTML::style('assets/styles/jquery.multiselect.css'),PHP_EOL ?>
<?echo HTML::style('assets/styles/newshop.css'),PHP_EOL ?>
<?echo HTML::style('assets/styles/jquery.multiselect.filter.css'),PHP_EOL ?>
<?echo HTML::style('assets/styles/jquery.nailthumb.1.1.min.css'),PHP_EOL ?>
<?echo HTML::style('assets/scripts/jquery.nailthumb.1.1.min.js'),PHP_EOL ?>
<? if(I18n::$lang == 'de') echo HTML::script("assets/scripts/locale/jquery.multiselect.filter.de.js"),PHP_EOL ?>
<?echo HTML::script('assets/scripts/plugins/upload/jquery.ui.widget.js'),PHP_EOL ?>
<?echo HTML::script('assets/scripts/plugins/upload/jquery.iframe-transport.js'),PHP_EOL ?>
<?echo HTML::script('assets/scripts/plugins/upload/jquery.fileupload.js'),PHP_EOL ?>
<?echo HTML::script('assets/scripts/shop/show.js'),PHP_EOL ?>
<?echo HTML::script('assets/scripts/newshop/edit.js'),PHP_EOL ?>
<?echo HTML::script('assets/scripts/jquery.ui.draggable.js'),PHP_EOL ?>
<?echo HTML::script('assets/scripts/jquery.ui.droppable.js'),PHP_EOL ?>