I think I did everything right. But for some reason when I place left: '20px' I get an error on the error console
$(document).ready( function(){
Init();
});
//Used for Initializing Events
function Init()
{
$("p").hover( function()
{
$(this).css("background-color", "yellow");
},
function()
{
$(this).css("background-color", "white");
});
$("body").fadeIn("slow");
$("h2").click( function()
{
$("h2").animate(
{
opacity: .25
left: '20px'
}
);
});
Your animate’s object properties need a comma separating them: