+1  A: 

The first way is the example given in the documentation. I've just tested it with one of my own projects and it works fine. Which versions of jQuery and jQuery UI are you using? I have 1.3.2 and 1.7.2 respectively.

brownstone