jquery - ".effect('bounce')" is not working. Please help :'( -
i've got little bit difficulty.
why .effect doesn't work, .fadeout works fine. confuses me bones. can't move on working if don't solve simple thing. here html, css, , custom-script make. please me, appreciated... :)
index.html
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>untitled document</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> <script src="js/script.js"></script> <link rel="stylesheet" href="css/styling.css"> </head> <body> <div class="blue"></div> <div class="button"></div> </body> </html> styling.css
.blue {width:400px; height:400px; background-color:blue; left:0px; position:absolute;} .button {width:250px; height:150px; background-color:green; position: absolute; bottom:0px; left:0px; cursor: pointer;} script.js
$(document).ready(function(){ $('div.button').click(function(){$('div.blue').effect('bounce');}); });
seem you're missing jquery ui files, can add jquery ui css , js reference files code:
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" /> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> final included css , scripts order should this:
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" /> <link rel="stylesheet" href="css/styling.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> <script src="js/script.js"></script>
Comments
Post a Comment