Note: I'm very new at using Drupal, so I may be missing something.
I've searched high and low, but I can't seem to find an answer to this.
I've got a custom Drupal theme based on Zen, and I want to include a jQuery plugin (specifically, Lightbox) into a page that needs it (I'm using Panels and Views to create custom landing pages). Frankly, I'd be happy even if I had to include it on the entire site.
I tried placed the script and CSS/image files in my theme's folder, and then using the following in
mytheme_preprocess_page() in my theme's
$options = array('group' => JS_THEME); drupal_add_js(drupal_get_path('theme', 'mytheme') . "/js/jquery.lightbox.js', $options);
/ (and I didn't include the CSS file, anyway).
I saw an example of using
hook_library(), and this looks promising as it allows specification of CSS files as well, but I'm not sure where/how to include this setup code.
Also, I realize that there is a Lightbox module, but because the way that my content types and views are done, I can't add
rel="lightbox" to the anchors...