(function($){ $('div1').velocity({width:'300px'}); })(jQuery);
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" type="text/css" href="css/style.css"> <script type="text/javascript" src="js/jquery-1.4.3.js"></script> <script type="text/javascript" src="js/velocity.min.js"></script> <script type="text/javascript" src="js/velocity.ui.min.js"></script> </head> <body> <div id="div1" class="box"></div> <script type="text/javascript" src="js/script.js"></script> </body> </html>
css我就不粘了
$('div1'),少了个#号哦
发现错误了.........................