Alert jQuery Objects
Sometimes we need to know a little more about jQuery objects returned by selectors, callback functions, etc.
It's so simple, we just need to execute an alert on object:
alert($('#objectId'));
Return: [object Object].
wrong answer...
You've probably seen this before.
The correct way: alert($('#objectId').toSource());
So simple as before.
Português
Add new comment