Alert displaying [object Object]
Hello everyone I am trying to alert the ID of a particular menu that I have clicked on and I am getting object,object. Instead of the name of the ID. Any help would be appreciated.
- function menuEvents() {
$('#test').click(function() { test( $('#testSection')) });
}
- function test(menuElement) {
if( menuElement.css('display') == "none" ) {
menuElement.slideDown(1000, expandComplete);
alert("Menu Element: " + menuElement);
return false;
}
else {
menuElement.slideUp();
}
}