0

I am using a jquery library, here http://www.jqueryscript.net/menu/iPod-Style-jQuery-Sliding-Drill-Down-Menu-Plugin.html, and I'm trying to add it on my app. These are my import statements:

app.import('other_components/drilldown/css/linkes_drilldown.css');
app.import('other_components/drilldown/src/linkes_drilldown.js');

To be use to use that library, the function linkesDrillDown() has to be called as $('.drillDownMenu').linkesDrillDown();. When calling this function, the following error is being produced:

undefined is not a function

which basically means that the library is not being loaded. Any idea, is there anything wrong with the import statements?

peterh
  • 11,875
  • 18
  • 85
  • 108
Noor
  • 19,638
  • 38
  • 136
  • 254
  • What is the specific error that you are getting? – Oren Hizkiya Jan 04 '15 at 05:23
  • the import statement seems correct whenever your path is the correct one. Are you sure of your jQuery selector what's the output of `console.log($('.drillDownMenu').length);` can you also check properly that your plugin is loaded for example by using this : http://stackoverflow.com/questions/400916/how-can-i-check-if-a-jquery-plugin-is-loaded – MrVinz Jan 04 '15 at 08:15
  • the selector is okk, the plugin is not loading – Noor Jan 04 '15 at 08:52

1 Answers1

2

It seems that this plugin is not available via Bower. Put the plugin contents in the vendor folder and modify the import statements to be like

app.import('vendor/drilldown/css/linkes_drilldown.css');
app.import('vendor/drilldown/src/linkes_drilldown.js');
blessanm86
  • 31,439
  • 14
  • 68
  • 79