jQuery not working for fadeOut

jquery

Solution

Change this:

<script type="text/javscript" src="js/jquery-1.10.2.min.js">

        jQuery(document).ready(function($) {
            $("img").click(function(event) {
                $(this).fadeOut('slow');
            });
        });

      </script>

To this:

<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript">

        jQuery(document).ready(function($) {
            $("img").click(function(event) {
                $(this).fadeOut('slow');
            });
        });

      </script>

When you load an external script using the `src` attribute, the browser will ignore the contents of the `<script>` tag if the request is successful. The solution is easy, just add another script tag.

You should also remove the `<html>` that is before your `<!DOCTYPE html>`. It is pointless and wrong. Also, if this is the entire document, you need a `</html>` at the very end.

Problem

I got this code for testing purpose, it's very simple , when I open it in Firefox for debugging, it's not working, everything appears to be loaded and fine, it's very weird, any thoughts on this? . many thanks ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Hover Over effect jQuery</title> <link rel="stylesheet" href="css/style.css"> <script type="text/javscript" src="js/jquery-1.10.2.min.js"> jQuery(document).ready(function($) { $("img").click(function(event) { $(this).fadeOut('slow'); }); }); </script> </head> <body> <div class="viewport"> <a href="#"> <img src="images/renew.jpg"> </a> <div class="caption"><span>Caption goes here</span> </div> </div> </body> </html> ```

Original source