design patterns - Javascript functions -


We are only trying to provide some special functions to run on the basis of the request's address.

I was wondering how we could do this:

  if (condition1) {$ (document) .ready (function () {... .. // function1 condition1}}; } Else if (condition2) {$ (document) .ready (function () {... ... // function of condition2}}); And if ...  

I was wondering what would a good pattern work for it? Since we have all our functions in a file.

It depends on your terms ..

If they are all similar formats, then you have something similar to

  array = [["page 1", page 1func], ["page 2", page 2func] Can, ...] for (i = 0; i  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -