I'm learning jQuery by writing some code in Chrome's console, e.g. adding an id
to a DOM element and then executing jQuery functions.
On some websites (for example Google) I get Uncaught TypeError
and on others, I don't. Here is an example:
DOM modification:
<input id="test" aria-label="Szukaj w Google" name="btnK" type="submit" jsaction="sf.chk">
Console:
$("#test").hide()
Error:
VM598:1 Uncaught TypeError: $(...).hide is not a function
at <anonymous>:1:12
The same flow on other websites (for example StackOverflow) works. What is the reason?