I’ve discovered I’d been writing some odd jQuery when I started using it. If you look at the demo below, you’ll notice that passing the id
of the element as if it were a (non-existing) parameter actually works.
codepen.io/anon/pen/xRdGVg
Pretty sure this is because of the Sizzle engine that jQuery uses.
Why is this and what is there against passing a parameter in such a way?
Edit – in any case it won’t trigger if there’s actually a variable with the same name…
And it’s not even because of JQ as I thought before:
codepen.io/anon/pen/jVmPzE