Gaston Claret
Gaston Claret

Reputation: 998

Is there a design pattern used in Fancybox?

I'm wondering what's the name (if it exists), of the design pattern used in Fancybox.

From my understanding, you set a number of parameters (title, description, buttonContent, etc), and create a type of fancybox, for example a yes/no fancybox.

When you do this, fancybox expects that you implement the methods to be called onYesClick, onNoclick.... what is this called?

I looked around the website & documentation, and couldnt find the answer.

Thanks a lot

Upvotes: 0

Views: 50

Answers (1)

Janis
Janis

Reputation: 8769

I think it could be called "Object Literal pattern". See this blog post about organizing the code - http://rmurphey.com/blog/2009/10/15/using-objects-to-organize-your-code/

Upvotes: 1

Related Questions