How to conditionally load javascript file on view page
This should work:

/**
 * Implements template_preprocess_views_view().
 */
function themename_preprocess_views_view(&amp;$vars) {
  $view = $vars['view'];
  if ($view-&gt;name == 'view_name') {
    // Standardize the output for rows.
    drupal_add_js(drupal_get_path('theme', 'themename') . '/js/js_name.min.js', array('scope' =&gt; 'footer'));
  }
}