I have been using the JQP module to load jQuery plugins (like jQuery UI, jQuery JSON). After upgrading to 6.x-2.0-beta1, I can't seem to get it working anymore.
I have created the "sites/all/js_library" directory and put the files in there, for example, a "jquery.ui-1.7.1" sub-folder contains all the jQuery UI stuff. Then I created a ".info" file in the "sites/all/js_library" folder with these:
name = JQuery UI
description = Files from jQuery UI and jQurey JSON libraries.
project_url = http://ui.jquery.com
scripts[][] = jquery-ui.js
stylesheets[][] = jquery-ui.css
scripts[1.7.1][] = jquery-ui[-1.7.1].custom.js
stylesheets[1.7.1][] = jquery-ui[-1.7.1].custom.css
scripts[][] = jquery-json.js
But I still can't load the libraries. Here is how I try to do that:
drupal_add_js_library('jquery-ui', 0, array
(
'css' => 'jquery-ui.css',
'js' => 'jquery-ui.js'
)
);
drupal_add_js_library('jquery-json', 0, array
(
'js' => 'jquery-json.js'
)
);
I don't see my stuff in the "sites/all/js_libraries" showing up in the JQP admin page either, which I think indicates that the ".info" file is not working. I am trying to follow the code but would really appreciate any insights from others.
Thanks and regards,
--
Wei
Comments
Got it figured out
Got it figured out.
Note that the .info file name must be the same as the name field inside the file. I had trouble when I had name = jquery-json when the file name is jquery.json.info, in which case the JQP status page would show the library name as jquery-json but the internal data structure uses jquery.json as the name (key) for that library.
jqGrid module integration
I like to get your module and to know more about how to use it in Drupal
regards
uziben1@gmail.com
Those are not my modules
I am not sure if you are still interested, I have written a blog entry here about what I have used:
http://teknowfile.blogspot.com/2009/08/drupal-6-jqp-jquery-plugins.html