Jquery没有在jsFiddle中加载

时间:2013-01-02 05:43:11

标签: jquery jquery-ui angularjs jsfiddle

我正在尝试使用jQuery-ui拖放角度js来获得手风琴列表...... 然而,我的拖放在jsFiddle中工作(在本地服务器中工作),因为firebug声明:ReferenceError:jQuery未定义。

Here是jsFiddle

               <!DOCTYPE html>
<html ng-app="App">

<title>Task WhiteBoard</title>
<head>
<meta charset="utf-8" />     
<meta name="description" content="AngularJS + jQuery UI Drag-n-Drop" />
<title>Angular Drag and Drop</title>
</head>


<body ng-controller="dndCtrl" ng-cloak>
<h3>Task Whiteboard</h3>


<div class='list1' droppable value='1' >    

<div class='header'>
    Free Tasks
</div>

<div class="below-header">

</div>

<div  ng-repeat="item in list1" data-index="{{$index}}" draggable>
    <div class="zippy" zippy-title="{{item.name}}">
            {{item.content.newLabel}}    <br/>
            {{item.content.desc}}    <br/>
            {{item.content.effort}}    <br/>
            {{item.content.owner}}    <br/>
            {{item.content.issues}}    <br/>    
            {{item.content.comments}}    <br/>
            {{item.content.dependency}}    <br/>
    </div>    
</div>    
</div>    

<div class='list2' droppable value='2'>    

<div class='header'>
    Claimed Tasks
</div>

<div class="below-header">

</div>

<div ng-repeat="item in list2" data-index="{{$index}}" draggable>
    <div class="zippy" zippy-title="{{item.name}}">
            {{item.content.newLabel}}    <br/>
            {{item.content.desc}}    <br/>
            {{item.content.effort}}    <br/>
            {{item.content.owner}}    <br/>
            {{item.content.issues}}    <br/>    
            {{item.content.comments}}    <br/>
            {{item.content.dependency}}    <br/>
    </div>    
</div>    
</div>

<div class='list3' droppable value='3'>

<div class='header'>
    Completed Tasks
</div>

<div class="below-header">

</div>

<div ng-repeat="item in list3" data-index="{{$index}}" draggable>
        <div class="zippy" zippy-title="{{item.name}}">
            {{item.content.newLabel}}    <br/>
            {{item.content.desc}}    <br/>
            {{item.content.effort}}    <br/>
            {{item.content.owner}}    <br/>
            {{item.content.issues}}    <br/>    
            {{item.content.comments}}    <br/>
            {{item.content.dependency}}    <br/>
        </div>    
</div>
</div>    


<div style="clear:both;">
    list 1 size : {{list1.length}}    <br/>
    list 2 size : {{list2.length}}    <br/>
    list 3 size : {{list3.length}}    <br/>
</div>
</body>
</html>

2 个答案:

答案 0 :(得分:1)

JSFiddle的左侧面板上查看,如果您要使用,则选择了Pure JS 然后Jquery UI选择jquery version 1.7.2并检查位于其下方的复选框jquery UI 1.8.18

答案 1 :(得分:0)

您的托管资源出现故障。您需要首先使用jquery重新排序它们,然后是jquery ui等。这将解决jQuery未定义的JS错误。