未定义的引用错误$未定义 [英] uncaught reference error $ is not defined

查看:152
本文介绍了未定义的引用错误$未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误,并且我的网站上没有javascript正在运行:
uncaught引用错误$未定义

I am getting the following error and no javascript is working on my site: uncaught reference error $ is not defined

它工作但我不能现在看看有什么问题可以帮助吗?

It was working but i cannot now see where there is something wrong Can anyone please help?

我在这里链接到javascript文件:

I am linking to javascript files here:

    <script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jsfunctions.js" type="text/javascript"></script>

这里是js函数脚本

//-------------------------- MENU MOVE
$(document).ready(function(){
   $(".one").hover(function() {
       $(this).stop().animate({ marginTop: "5px" }, 200);

    },function(){
        $(this).stop().animate({ marginTop: "0px" }, 300);

    });
});

$(document).ready(function(){
   $(".two").hover(function() {
      $(this).stop().animate({ marginTop: "5px" }, 200);

    },function(){
        $(this).stop().animate({ marginTop: "0px" }, 300);

    });
});


$(document).ready(function(){
   $(".three").hover(function() {
      $(this).stop().animate({ marginTop: "5px" }, 200);

    },function(){
        $(this).stop().animate({ marginTop: "0px" }, 300);

    });
});


$(document).ready(function(){
   $(".four").hover(function() {
      $(this).stop().animate({ marginTop: "5px" }, 200);

    },function(){
        $(this).stop().animate({ marginTop: "0px" }, 300);

    });
});


$(document).ready(function(){
   $(".five").hover(function() {
    $(this).stop().animate({ marginTop: "5px" }, 200);

    },function(){
        $(this).stop().animate({ marginTop: "0px" }, 300);

    });
});


$(document).ready(function(){

    $(".plane").stop().animate({ marginRight: "2000px" }, 40000);


});


$(document).ready(function(){
   $(".signinbutton").hover(function() {
        $(this).stop().fadeTo('slow', 0.5);

    },function(){
        $(this).stop().fadeTo('slow', 1.0);

    });
});

$(document).ready(function(){
   $(".forgotton").hover(function() {
        $(this).stop().fadeTo('slow', 0.5);

    },function(){
        $(this).stop().fadeTo('slow', 1.0);

    });
});


//-------------------------------- SOCIAL FADES
$(document).ready(function(){
   $(".twitter").hover(function() {
        $(this).stop().fadeTo('slow', 0.7);

    },function(){
        $(this).stop().fadeTo('slow', 1.0);

    });
});

$(document).ready(function(){
   $(".facebook").hover(function() {
        $(this).stop().fadeTo('slow', 0.7);

    },function(){
        $(this).stop().fadeTo('slow', 1.0);

    });
});

$(document).ready(function(){
   $(".rss").hover(function() {
        $(this).stop().fadeTo('slow', 0.7);

    },function(){
        $(this).stop().fadeTo('slow', 1.0);

    });
});

//------------------------------------ EMAIL DETAILS


$(function() {

$(".submit").click(function() {

var name = $("#name").val();
var email = $("#email").val();
    var comment = $("#comment").val();
    var dataString = 'name='+ name + '&email=' + email + '&comment=' + comment;

    if(name=='' || email=='' || comment=='')
     {
    alert('Please Give Valid Details');
     }
    else
    {
    $("#flash").show();
    $("#flash").fadeIn(400).html('<img src="../img/-loader.gif" align="absmiddle">&nbsp;<span class="loading">Loading Comment...</span>');
$({
        type: "POST",
  url: "comment.php",
   data: dataString,
  cache: false,
  success: function(html){

  $("ol#update").append(html);
  $("ol#update li:last").fadeIn("slow");
  document.getElementById('email').value='';
   document.getElementById('name').value='';
    document.getElementById('comment').value='';
    $("#name").focus();

  $("#flash").hide();

  }
 });
}
return false;
    });



});

// ----------------------------- Profile Email Check
$(document).ready(function() {

        //the min chars for username
        var min_chars = 3;

        //result texts
        var characters_error = 'Minimum amount of chars is 3';
        var checking_html = 'Checking...';

        //when button is clicked
        $('#check_username_availability').click(function(){
            //run the character number check
            if($('#username').val().length < min_chars){
                //if it's bellow the minimum show characters_error text '
                $('#username_availability_result').html(characters_error);
            }else{
                //else show the cheking_text and run the function to check
                $('#username_availability_result').html(checking_html);
                check_availability();
            }
        });

  });

//function to check username availability
function check_availability(){

        //get the username
        var username = $('#username').val();

        //use  to run the check
        $.post("lib/-checkemail.php", { username: username },
            function(result){
                //if the result is 1
                if(result == 1){
                    //show that the username is available
                    $('#username_availability_result').html(username + ' is not registered. They will be sent an email to invite them to sign up.');
                }else{
                    //show that the username is NOT available
                    $('#username_availability_result').html(username + ' is already registered. They will be notified of their invitation via email.');
                }
        });

}

function showImage(){
        document.getElementById('overlay').style.visibility='visible';
    }
document.getElementById('.videofullme').style['-webkit-transform'] = 'rotate(90deg)';
document.getElementById('.videofullme').style.webkitTransform = 'rotate(90deg)';
document.getElementById('.videofullme').style.WebkitTransform = 'rotate(90deg)';


推荐答案

您对 jquery的引用。 js 未加载。

使用Firebug查找原因。

Use Firebug to find out why.

这篇关于未定义的引用错误$未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆