I am trying to remove an appended element after I have hidden the element on mouse out. What have I done wrong with the callback in the .hover callback?
// START OF $(document).ready(function() {
$(document).ready(function ()
$('.custom-right-boxes a').hover(function () {
$(this).append('<div class="click-here"><b>Click</b><span>Here</span></div>');
$('.click-here').stop().animate({
width: '88px',
height: '58px',
marginLeft: '-44px',
marginTop: '-40px'
}, {
duration: 300
});
}, function () {
$('.click-here').stop().animate({
width: '0px',
height: '0px',
marginLeft: '-0px',
marginTop: '-0px'
}, {
duration: 300
}),
function () {
$('.click-here').remove();
};
});
// END OF $(document).ready(function() {
});
)in the wrong place toward the end.