Zepto not working

Hi I'm trying out the zepto.js library because it's so small...

I wrote the simplest line:

$('#content').animate({opacity: 0.25}, 0.5);

But it doesn't work, nothing happens?
Who is Participating?
It seems to be working for me (on firefox and chrome).
Target platforms
Safari 5+ (desktop)
Chrome 5+ (desktop)
Mozilla Firefox 4+
iOS 4+ Safari
Android 2.2+ Browser
Other WebKit-based browsers/runtimes
webOS 1.4.5+ Browser
BlackBerry Tablet OS 1.0.7+ Browser
Amazon Silk 1.0+
Opera 10+

So, if you are testing in IE, it will not work. I used:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

<html xmlns="http://www.w3.org/1999/xhtml">
<script type="text/javascript" src="zepto.js"></script>
<script type="text/javascript">
    $('#content').animate({opacity: 0.25}, 500);

	<div id="content">Hello</div>

Open in new window

> $('#content').animate({opacity: 0.25}, 0.5);
the duration should be in milliseconds.  You probably meant 0.5 secs. If that is the case try:
$('#content').animate({opacity: 0.25}, 500);//500millisecs=0.5secs

Also, make sure you call it once #content is ready/available:
    $('#content').animate({opacity: 0.25}, 500);

Open in new window

intoxicated_curveballAuthor Commented:
Still doesn't work. I think it's the library failing, I might try another library, I don't think this one is very good?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.