我无法用 jQuery 隐藏我的段落

I can't hide my paragraph with jQuery

大家好,我无法隐藏我的段落,我不知道为什么。

Here is mi jsfiddle

和我的代码:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title> Ejemplo 1</title>

    </head>
    <body>
            <p id="paragraph">This is Sparta</p>
            <script type="text/javascript" src="js/jquery.js"></script>
            <script type="text/javascript" src="js/hide.js"></script>
    </body>
</html>


    $('#paragraph').click(function)  {


    $('#paragraph').hide();

});

以下是您对“如何通过 jQuery 单击时隐藏 ID 元素”的回答,这可能是您的问题标题。

答案:

$('#paragraph').click(function() {
    $('#paragraph').hide(500);
});

同样在您的 fiddle 中您没有加载 jQuery!

<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>

这是您更新后的工作 fiddle。

https://jsfiddle.net/0xhg57e4/3/