Link to home
Start Free TrialLog in
Avatar of maccaj51
maccaj51Flag for Afghanistan

asked on

Jquery ui autocomplete and keyup animation

Hi Experts,

I have this code which works great...
$("#s").autocomplete({
source: function(request, response) {
            $.ajax({
                url: "/wp-content/themes/default/php/json.all.php",
                dataType: "json",
                data: {
                    term: request.term,
                },
                success: function(data) {
                    response(data.slice(0, 5));
                }
			})
},
 minLength: 2,
 select: function( event, ui ) {
            window.location = ui.item.url;
        }
})

Open in new window


I now want to add an animation class (.loader) to #s parent div whilst someone is typing... which removes after the autocomplete has loaded or until focus out.

Could someone please assist.

Many thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of Roopesh Reddy
Roopesh Reddy
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maccaj51

ASKER

Many Thanks