I guess you want to use effect()
jQuery UI function.
First of all, the jQuery UI was not imported in your JSFIDDLE.
Import it in your page using the cdn url:
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
Another problem is that your selector is not correct. >
is the child selector that selects all direct child elements specified by "child" of elements specified by "parent".. So, instead of #nav > li
you should use #nav > ul > li
or #nav li
, both working.
Another problem is that you use the string "this"
instead of variable this
that is the reference to the DOM element of invocation. See this topic for more information.
Your script becomes:
// on ready callback
$('#nav > ul > li').hover(function(){
$(this).effect('bounce',{times:3},500);
});
Updated JSFIDDLE