using hover with live function
my jquery was intially was
- $(document).ready(function () {
$('ul.nav li').hover(
function () {
$('ul', this).slideDown(100);
},
function () {
$('ul', this).slideUp(100);
}
);
});
this works well , but becasue mine is ajax page and rewplace html element with id nav theeis will not work , I must use http://api.jquery.com/live/
I changed the function to
- $(document).ready(function () {
$('ul.nav li').live('hover',function(event){
function () {
$('ul', this).slideDown(100);
},
function () {
$('ul', this).slideUp(100);
}
});
});
obviosly its not working ,I think this is wrong but I am dumb in java script , pelase help me .