Uncaught Typeerror: Object [object Object] Has No Method 'apply'
I am receiving this Uncaught TypeError on a new website I am creating, but I can't work out what is causing the error. I have recreated the issue at the link below, if you take a l
Solution 1:
Be sure to wrap those in asynchronous callbacks:
$('.newsitem').hover(
function() {
$(this).children('.title').animate({height:'34px'});
}, function() {
$(this).children('.title').animate({height:'0px'});
}
);
Solution 2:
Solution 3:
You're missing the function
...
$('.newsitem').hover(
$(this).children('.text').animate({height:'34px'}),
$(this).children('.text').animate({height:'0px'})
);
To:
$('.newsitem').hover(function() {
$(this).children('.text').animate({
height: '34px'
});
}, function() {
$(this).children('.text').animate({
height: '0px'
});
});
And the $(this).children('.text')
, is not selecting anything.
Solution 4:
use slide animation to handle hight of the .text class.
$('.newsitem').hover(function() {
$(this).children('.text').slideToggle();
});
Post a Comment for "Uncaught Typeerror: Object [object Object] Has No Method 'apply'"