Home > front end >  Jquery modular development, how to share variables between function?
Jquery modular development, how to share variables between function?

Time:09-17

I wrote a component, my idea is introduced to configuration parameters, calls the init function, initialization of components, and then call getnowstep function, obtaining, introduced into the configuration parameters initialization time do some movement, the function between the variables to share? Or how this program can be optimized? O great god answer!!!!!!

CodePudding user response:

Use this attribute name to save the data

CodePudding user response:

 
Var opts=this. The options=$. The extend ({}, defaults, option)

Getnowstep () {
Var color=this. Options. Color
//use color
}
  • Related