duandun3178 2014-12-07 10:00
浏览 111
已采纳

我的jquery代码不能在任何浏览器中运行

my jquery is not working in any browser i reffered many answers on web for it none helped me out..!!

This is my code in the index file i tried in both (index.html) and (index.php)

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Jquery</title>
</head>
<body>
<div id="message" style="display:none;"> Welcome to my site</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/fade.js"></script>

</body>
</html>

the javascript files were in js folder.

And the fade.js code was :-

$(document).ready(function() {
$('#message').fadeIn('slow'); 
});

and the jquery code was which i downloaded from jquery website i tried the production both versions 1 and 2 and also other source links like

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>

also jquery source links which some users uses. also i tried to shift the script code above the tags. but whatever it is i tried not working in any browsers.

Please Help me out guys...!!

  • 写回答

3条回答 默认 最新

  • dongsiju1941 2014-12-07 10:04
    关注

    fucntion should be function & load the jQuery before your script.

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    $(document).ready(function() {
                      /*^^^^^^*/
        $('#message').fadeIn('slow');
    });
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思