Re: Javascript: $ Symbol Meaning
The $ (dollar sign) is a custom function. It is not for regex, nor does it have anything to do with PHP.
It was created a few years back to make the process of finding/getting elements much simpler. Take a look at this post from my website. It clarifies this well.
Code:
(statement) ? true : false;
This is known as ternary logic. Nice and simple. It takes an if statement to one line and makes the processing much faster.

Originally Posted by
code?
How would I type up a static class in javascript, So I could easily write...
Let's make this much simpler...try using objects. They go hand in hand with classes.
Code:
var myObject = {
myFunction = function(str) {
alert(str);
},
myRandomVariable: 'Hello world!'
}
// then to call it
myObject.myFunction('Hello world!');
Last edited by PeejAvery; August 11th, 2008 at 08:03 AM.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.