Javascript Translators?

Luigy
8 years ago | edited 8 years ago

0

can anyone translate this line for me? quote=author[0][/quote]. I don’t get why it has the [0] and why #pass has the # before it. I’m weak on coding, but usually i read pretty easily. Any help?

2replies
3voices
167views
dloser
8 years ago

0

This isn’t so much about JavaScript, but more about JQuery. So perhaps check out that topic.

? [bolofecal]
8 years ago

0

This thread is more correct for your thread: https://www.hackthis.co.uk/forum/programming-technology/programming-discussion

$('.level-form #pass')[0]

But… I remove the extra (

$(<element, id or class>) -> this is the jQuery selector

.level-form #pass -> means that you will select all elements with ‘pass’ id inside all elements with ‘level-form’ class

[0] -> this is just to select the first element.

If you want know jQuery: http://www.w3schools.com/jquery/

Discussion thread has been locked. You can no longer add new posts.
1 of 3

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss