if I use:
jQuery(document).ready(function() {
console.log($(this));
});
then in console I have object:
[Document mypage.html#weather]
how can i get for this last ID? In this example this is #weather. I would like use alert #weather in selector, for example $(data_from_console + '.add').val();
Do you want to get the last element that has an ID attribute?
If so:
EDIT
On a closer look, are you looking for the hash tag? ie. if your URL is
mypage.html#weatheryou want the #weather ?In that case try: