The following code is used:
jQuery(document).ready(function() {
console.log($(this));
});
After running this code, the object displayed in the console is:
[Document mypage.html#weather]
How can I retrieve the last ID from this object? In this scenario, the last ID is #weather. I want to use alert with #weather as a selector, like this:
$(data_from_console + '.add').val();