Gaelen
Gaelen

Reputation: 315

Jquery ui "toggle class" not easing

I have a row of boxes.

To achieve this I'm using JQuery UI to toggle CSS classes. Here is my code on jsFiddle

It works fine, except the transition doesn't ease in or out gently like in this JQuery demo.

What am I doing wrong? Help (or suggestion on a better method) would be very much appreciated.

Upvotes: 1

Views: 1801

Answers (4)

cambraca
cambraca

Reputation: 27835

Enable jQuery UI. Also, this code should be enough for all your boxes (you don't have to repeat it several times).

$(function() {
    $( ".feature" ).hover(function() {
        $( this ).toggleClass( "feature_expand", 1000 );
        return false;
    });
});

Upvotes: 1

The Alpha
The Alpha

Reputation: 146201

Try this http://jsfiddle.net/Gaelen/vBDRb/3/

Upvotes: 0

j08691
j08691

Reputation: 207900

You didn't enable jQuery UI. Check the box on jsFiddle and it'll work. Ex: http://jsfiddle.net/vBDRb/4/

Upvotes: 1

Eric Hodonsky
Eric Hodonsky

Reputation: 5897

I think you need the easing library plugin as well bro:

http://gsgd.co.uk/sandbox/jquery/easing/

Upvotes: 0

Related Questions