Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Instead of self I often see that used. It's just important to keep it consistent. Commented Jun 21, 2013 at 10:32
  • @k0pernikus - you're correct, you can assign it to whatever you're comfortable with. Personally, I prefer self but that is just as valid. Commented Jun 21, 2013 at 10:33
  • This have one problem if I use in two element don't answer or example : ColorBox('target','red') ; ColorBox('target2','lime') ; it is do on second only. Commented Jun 21, 2013 at 10:46
  • 1
    @MahdiParsa - remember to use new, here it is working: jsfiddle.net/37zq5/7 Commented Jun 21, 2013 at 10:48