views:

51

answers:

1

I am working on a module for Drupal 7. I am using some of the jQuery UI modules which are included.

my natural way to include these is to use drupal_add_js() and drupal_add_css() with the relevant files. However this feels a little wrong. Is there an official (or better) way to include these libraries, either from Drupal or jQuery.

I tend to find the Drupal/jQuery interface very powerful but frustratingly sparse on documentation.

+3  A: 

Found it! drupal_add_library() does precicely what I wanted, also looks like there are a few other library hooks.

Sorry for answering my own question.

Jeremy French