I’m back

I haven’t wrriten in more than a year. I’ve been very busy in my new job. I’m mostly working in Python now and doing a bit of Java. On the side, I’m working on a website, a pet project which I’m writing in django with jquery on the client side. I’m planning it as a one page javascript app. The first thing that puzzled me when starting with jquery was this weird $ sign everywhere. What is it?

I was used to $ prepending variable names from shell programming.

I was also used to $ from regular expressions

I was also remembering $ from that sign we’re all chasing up in this rat race.

In turns out there’s no mystery at all. $ is just another function – javascript allows functions names to start with $, _ or letters, but no numbers. So $ is a special function, also known as jquery. $ makes it more succint, especially if you’re trying to minimize the size of your javascript scripts.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: