I keep trying tutorials and keep failing. Can someone please help me see what I'm doing wrong?
Here is the simple tutorial I was trying to follow:
jQuery for Complete Beginners: Part 1
and here is my code:
thanks : )HTML Code:<!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>Jquery</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"> $('div p') //selects all paragraphs that exist within a parent div. $('#something') //selects the element with an id of 'something' $('.something') //selects the element(s) with a class of 'something' </script> <style> #something{ width: 200px; height: 200px; background-color:#F00 } </style> <script type="text/javascript" $('#something').animate({'margin-top': '300px', 'margin-left': '400px'},1000); </script> </head> <body> <div id="something">YO</div> </body> </html>




Bookmarks