Accordion with global function.

Accordion with global function.

Im using the global function and trying to use that in accordion how  should i declare newPanel