Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 我有9个小图片,当点击时,会在图片的大版本中消失。为什么不能在浏览器中工作(FF))_Javascript_Jquery_Html - Fatal编程技术网

Javascript 我有9个小图片,当点击时,会在图片的大版本中消失。为什么不能在浏览器中工作(FF))

Javascript 我有9个小图片,当点击时,会在图片的大版本中消失。为什么不能在浏览器中工作(FF)),javascript,jquery,html,Javascript,Jquery,Html,})) 难道不是: <style type="text/javascript" src="jquery-1.11.0.min.js"></style> <style type="text/javascript" src="myCode.js"></style> ? 难道不是: <style type="text/javascript" src="jquery-1.11.0.min.js"></style> <

}))


难道不是:

<style type="text/javascript" src="jquery-1.11.0.min.js"></style>
<style type="text/javascript" src="myCode.js"></style>


难道不是:

<style type="text/javascript" src="jquery-1.11.0.min.js"></style>
<style type="text/javascript" src="myCode.js"></style>


难道不是:

<style type="text/javascript" src="jquery-1.11.0.min.js"></style>
<style type="text/javascript" src="myCode.js"></style>


难道不是:

<style type="text/javascript" src="jquery-1.11.0.min.js"></style>
<style type="text/javascript" src="myCode.js"></style>


标记应为
脚本

<script type="text/javascript" src="jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="myCode.js"></script>
HTML图像

$(document).ready(function(){

    $(".big-img").hide();
    $(".img").click(function(){
        var id = $(this).data(id);
        $("#"+id)
            .fadeIn(2000)
            .click(function(){
                $(this).fadeOut(2000);
            });

    });

});

标记应该是
script

<script type="text/javascript" src="jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="myCode.js"></script>
HTML图像

$(document).ready(function(){

    $(".big-img").hide();
    $(".img").click(function(){
        var id = $(this).data(id);
        $("#"+id)
            .fadeIn(2000)
            .click(function(){
                $(this).fadeOut(2000);
            });

    });

});

标记应该是
script

<script type="text/javascript" src="jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="myCode.js"></script>
HTML图像

$(document).ready(function(){

    $(".big-img").hide();
    $(".img").click(function(){
        var id = $(this).data(id);
        $("#"+id)
            .fadeIn(2000)
            .click(function(){
                $(this).fadeOut(2000);
            });

    });

});

标记应该是
script

<script type="text/javascript" src="jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="myCode.js"></script>
HTML图像

$(document).ready(function(){

    $(".big-img").hide();
    $(".img").click(function(){
        var id = $(this).data(id);
        $("#"+id)
            .fadeIn(2000)
            .click(function(){
                $(this).fadeOut(2000);
            });

    });

});



很多ID,你应该使用class。这不是问题所在,我的外部jquery由于某种原因无法链接到我的HTML文件。我以前让它工作过,但自从我重新工作后,它就无法连接了correctly@shawnb是的,直到他们再次点击较小的图片…仍然不是问题,请不要评论无关的代码。我的jquery/javascript链接有什么问题吗?看起来你的BODY标签中有它。它应该在标题标签中。对不起,我删除了不相关的评论。相对于这个HTML文件,你的jquery文件在哪里?很多ID,你应该使用class。这不是问题所在,我的外部jquery由于某种原因不会链接到我的HTML文件。我以前让它工作过,但自从我重新工作后,它就无法连接了correctly@shawnb是的,直到他们再次点击较小的图片…仍然不是问题,请不要评论无关的代码。我的jquery/javascript链接有什么问题吗?看起来你的BODY标签中有它。它应该在标题标签中。对不起,我删除了不相关的评论。相对于这个HTML文件,你的jquery文件在哪里?很多ID,你应该使用class。这不是问题所在,我的外部jquery由于某种原因不会链接到我的HTML文件。我以前让它工作过,但自从我重新工作后,它就无法连接了correctly@shawnb是的,直到他们再次点击较小的图片…仍然不是问题,请不要评论无关的代码。我的jquery/javascript链接有什么问题吗?看起来你的BODY标签中有它。它应该在标题标签中。对不起,我删除了不相关的评论。相对于这个HTML文件,你的jquery文件在哪里?很多ID,你应该使用class。这不是问题所在,我的外部jquery由于某种原因不会链接到我的HTML文件。我以前让它工作过,但自从我重新工作后,它就无法连接了correctly@shawnb是的,直到他们再次点击较小的图片…仍然不是问题,请不要评论无关的代码。我的jquery/javascript链接有什么问题吗?看起来你的BODY标签中有它。它应该在标题标签中。对不起,我删除了不相关的评论。相对于此HTML文件,您的jquery文件在哪里?隐藏在普通视线中。隐藏在普通视线中。隐藏在普通视线中。隐藏在普通视线中。好的,现在您最好发表一篇文章,说明为什么
class
优于
id
?!?好的,现在你最好发表一篇文章,谈谈为什么
class
id
?!?好的,现在你最好发表一篇文章,谈谈为什么
class
id
?!?好的,现在你最好发表一篇文章,谈谈为什么
class
id
?!?