All my js are located in the footer.

jqery.bxslider.js located first.

How I can add a weight for this js?

This code is not working.

function bxslider_library() {
  $module_path = drupal_get_path('module', 'bxslider');
  $library_path = libraries_get_path('bxslider');

  $libraries['bxslider'] = array(
    'title' => 'bxslider',
    'website' => 'http://bxslider.com',
    'version' => '4.1',
    'js' => array(
      $library_path . '/jquery.bxslider.min.js' => array(
        'scope' => 'footer',
        'weight' => 1001,
      ),
    ),

Comments

anikitin35’s picture

Example:

<script src="http://masterasevera.ru/sites/all/modules/bxslider/js/bxslider_ths.js?nr18ob"></script>
<script src="http://masterasevera.ru/sites/all/modules/jquery_update/replace/jquery/1.8/jquery.min.js?v=1.8.3"></script>

BxSlider does't working.

anikitin35’s picture

I found this code:

$js_settings = $vars['settings'];

drupal_add_js(array('bxslider_ths' => array($vars['slider_id'] => $js_settings)), 'setting');

How I can add weight for it?

VVVi’s picture

Status: Active » Closed (works as designed)