0

To use a jquery plugin in a control panel view the following is used in the module's mcp file:

ee()->cp->add_js_script(array('plugin' => 'dataTables'));

however I have a custom jqueru plugin, how do I load that into a control panel view? Where will the code above look for jquery plugins?

0

Third party add-ons should store their javascript files in their javascript folder, and then loading them using:

ee()->cp->load_package_js('my_file');

(Docs.)

ee()->cp->add_js_script() will only load javascript which EE includes in the download for its own use.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.