[jQuery] jQuery Function - how should I write it?

[jQuery] jQuery Function - how should I write it?


Here is function that I