Olá, como faço para resolver esse erro no meu código? Uncaught ReferenceError: $ is not defined
$(document).ready(function(){
// Function sortable
$( function() {
$( "#Essencial, #Importante, #Superfluo" ).sortable({
items: "li:not(.groupLi)",
connectWith: ".connectGroup",
cursor: 'move',
cursorAt: { left: 20 },
tolerance: 'pointer',
revert: 'invalid',
placeholder: 'span2 well placeholder tile',
receive: function(event, ui) {
$('li.groupLi', ui.sender).hide();
if($('li:not(.groupLi)', ui.sender).length == 0){
$('li.groupLi', ui.sender).show();
} else {
if ($('#Essencial').children('li').length > 0){
$('#Essencial li:contains(Arraste um item)').hide();
}
if ($('#Importante').children('li').length > 0){
$('#Importante li:contains(Arraste um item)').hide();
}
if ($('#Superfluo').children('li').length > 0){
$('#Superfluo li:contains(Arraste um item)').hide();
}
}
var urlData = ui.sender[0].id + '/' + this.id + '/' + ui.item[0].id;
$.ajax( "despesasNomeId/" + urlData)
.success(function( urlData ) {
})
.error(function( urlData ) {
});
},
update : function( event, ui){
//Contagem dos itens
var countEss = $('#Essencial li').not(".ui-sortable-helper").not(".groupLi").length;
var countImp = $('#Importante li').not(".ui-sortable-helper").not(".groupLi").length;
var countSup = $('#Superfluo li').not(".ui-sortable-helper").not(".groupLi").length;
$('#countEss').html(countEss);
$('#countImp').html(countImp);
$('#countSup').html(countSup);
},
stop : function( event, ui){},
}).disableSelection();
} );
})