javascript - Why isn't this jquery effect working? -


i working through course on codecademy , once finished , ran code.. worked fine, take code codecademy , set copy/paste own jquery folder reference/practice.

the goal project krypton bounce 3 times in 500ms, , script.js works in codecademy not when set locally.. know why?

index.html:

<html> <head>     <title></title>     <link rel="stylesheet" type="text/main" href="main.css"> </head> <body>  <div></div>   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script> <script src="script.js"></script>    </body> </html> 

main.css:

body { background-image: url('http://bit.ly/upqgj6');  }  div {     height: 100px;     width: 100px;     border-radius: 100%;     background-color: #008800;     background-image: -webkit-gradient(linear, 100% 0%, 0% 100%, from(#003500), to(#008800));     background-image: -webkit-linear-gradient(left, #003500, #008800);      background-image:    -moz-linear-gradient(left, #003500, #008800);     background-image:     -ms-linear-gradient(left, #003500, #008800);     background-image:      -o-linear-gradient(left, #003500, #008800); } 

script.js:

$(document).ready(function() {     $('div').click(function() {         $(this).effect('bounce', {times:3}, 500);     });  }); 

thank reading

it seem did't include jquery core library. jquery ui won't work because depend on jquery core. put above jquery ui script code

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

or can change version itself. see here version include:

https://developers.google.com/speed/libraries/devguide#jquery


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -