html - using jquery ui: Uncaught Type Error: cannot read property 'ui' of undefined -


i trying use jquery ui's draggable , droppable functions drag image id 'droppable1' div, keep receiving error:

uncaught typeerror: cannot read property 'ui' of undefined   @ jquery-ui.min.js:6   @ jquery-ui.min.js:6   @ jquery-ui.min.js:6 

i error:

uncaught reference error: $ not defined 

here html code:

<!doctype html> <html>     <head>           <!---materializecss stuff--->         <link href="https://fonts.googleapis.com/icon?family=material+icons" rel="stylesheet">         <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.1/css/materialize.min.css">         <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.1/js/materialize.min.js"></script>         <!---my stylesheet--->         <link rel="stylesheet" href="css/styles.css" />         <!--- use jquery widgets, etc --->         <script           src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"           integrity="sha256-vazp97zcwtekasvgpbsuwpfkdrwd3unufsgvyrahuqu="           crossorigin="anonymous">          </script>       </head>     <body>       <div id = "table" class="bottom">         <div class="col" id= "droppable1">one             <br/>              <img class = "clothe-pics drop" id = "clothe-pic" src = "">         </div>         <div class="col">two             <br/>             <img class = "clothe-pics" id = "pant-pic" src = "">         </div>         <div class="col">three             <br/>             <img class = "clothe-pics" id = "shoe-pic" src = "">         </div>     </div>      <div id = "table" class="bottom">         <div class="col">one             <br/>              <img class = "clothe-pics drag" id = "draggable1"  src = "https://huckberry.imgix.net/spree/products/244895/original/wnduxqrqos_taylor-stitch_yosemite_shirt_0_original.jpg">         </div>         <div class="col">two             <br/>             <img class = "clothe-pics" id = "pant-pic" src = "">         </div>         <div class="col">three             <br/>             <img class = "clothe-pics" id = "shoe-pic" src = "">         </div>     </div>     <script>         var count;         $(function() {             $( ".drag" ).draggable({                 revert: true             });             $( ".drop" ).droppable({                 drop: function( event, ui ) {                     /*$( )                         .addclass( "ui-state-highlight" )                         .find( "p" )                             .html( "dropped!" );*/                             createelements(ui.draggable, this);                 }             });           });     </script>     </body> </html> 

i'm thinking haven't scripted jquery in head right, i'm not sure how fix it. else know how fix or why i'm getting error?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -