1

I can't manage to successfully link jQuery to my html. I have made the most simple jQuery code possible just so I know it's right, and I've tried everything I can think of - searching hasn't been helpful..

my html file

<!DOCTYPE html>
<html>
    <head>
        <title>Test</title>
        <link rel="stylesheet" type="css/text" href="test.css"/>
        <script type="text/javascript" src="test.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
        <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
    </head>
    <body>
        <div id="orange"></div>
    </body>
</html>
Usman Maqbool
  • 3,351
  • 10
  • 31
  • 48

1 Answers1

0

first of all you need to add a jquery library

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

second: check your jquery working or not like

<script>
   $(function(fn){
 alert('Wow its workig');
   });
</script>
Jishnu V S
  • 8,164
  • 7
  • 27
  • 57
  • jQuery is already there. Don’t misuse the snippet editor. To check whether code is working, use the _browser console_, not `alert`s. – Sebastian Simon Aug 16 '16 at 05:36