There is this jQuery which seems to look for all elements with id="scuba"
, but then it uses attr() to pull the id out? Could "scuba" be part of the id and attr pulls the entire id out? I've never seen the $ inside an attribute selector, just outside like the example below.
$('*[id$=scuba]').attr('id')
So my questions are:
- What does the
$
or$=
do in this example - What does this code do?