Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Obfuscated Javascript?
Message
From
16/02/2013 15:00:16
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
16/02/2013 11:41:21
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
General information
Forum:
Javascript
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01566169
Message ID:
01566234
Views:
54
>now that is a line encouraging you to be fluent in, not with javascript ;-)

It's actually easy if you know a few things about jQuery:

- every selector function returns a collection of objects
- every function which does something to a collection of objects returns that collection
- other functions return attributes
- functions can be chained, i.e. if one returns a collection, then you can just append .anotherFunction() and it will be executed on the result of the previous function

So... $("some selector") returns a collection of objects (probably just one in this case)

$("some selector").val("some text") sets that text as a .value of the object(s)

$("some selector").val("some text").val() gets that value

And then you get the values of these concatenated as ordinary strings.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform