What does [object Object] mean?
The default conversion from an object to string is “[object Object]”. As you are dealing with jQuery objects, you might want to do to print the element’s ID. As mentioned in the comments, you should use the tools included in browsers like Firefox or Chrome to introspect objects by doing console.log(whichIsVisible()) instead of alert. Sidenote: … Read more