*** multiselect.module.orig	Sat Aug  6 10:27:59 2011
--- multiselect.module	Tue Oct 25 20:15:19 2011
*************** function multiselect_field_widget_form(&
*** 112,117 ****
--- 112,124 ----
      '#properties' => $properties,
    );
  
+   // Attach CSS and Javascript for this widget.
+   $module_path = drupal_get_path('module', 'multiselect');
+   $element['#attached'] = array(
+     'css' => array($module_path . '/multiselect.css'),
+     'js' => array($module_path . '/multiselect.js'),
+   );
+ 
    return $element;
  }
  
*************** function _multiselect_html_for_box_optio
*** 157,167 ****
   * return $widget = an array of html items and values for use in the final presentation of widget.
   */
  function _multiselect_build_widget_code($options, $items, $element, $required = FALSE) {
-   // Insert Javascript and CSS for this widget.
-   $path = drupal_get_path('module', 'multiselect');
-   drupal_add_js($path . '/multiselect.js');
-   drupal_add_css($path . '/multiselect.css');
- 
    // For this specific widget, HTML should be filtered out and entities left unencoded.
    // See content_allowed_values / content_filter_xss / filter_xss.
    _multiselect_allowed_values_filter_html($options);
--- 164,169 ----
