1

I was working on a small project these days, and I needed to work with some kind of home-made plugins based on jQuery.

I have 5 plugins and I want to wrap them in one big plugin to avoid extensive includes in my html in a way that make an hierarchy like this:

jQuery.BigPlugin.NestedPlugin

and I wanna know how to call the nested plugin methods.

Codek
  • 5,114
  • 3
  • 24
  • 38
mkanzit
  • 11
  • 2

1 Answers1

1

If you only want to avoid extensive includes you should merge the source files of your plugins into one file. Thus you have only to include one file and you don't need to change the API of these plugins. Here you'll find some hints how to do that: Combine and Minify Multiple CSS / JS Files.

Community
  • 1
  • 1
witrin
  • 3,701
  • 1
  • 24
  • 49
  • first of all, i wanna thank you for your answer. what i want is to separate the plugins to make their maintenance / reause easier in the future. so how can i groupn, activate and use them ???? – mkanzit Jul 18 '15 at 05:44