title: Trying to add mobile swipe to lightbox2
body: <p>So i've got a lightbox and i'm wanting to add hammer.js to my site. I have the following functions.php file. The two hammer js files i'm loading exist in my js folder within my child theme. </p>
  
  <pre><code>&lt;?php
  // Exit if accessed directly
  if ( !defined( 'ABSPATH' ) ) exit;
  
  // BEGIN ENQUEUE PARENT ACTION
  // AUTO GENERATED - Do not modify or remove comment markers above or below:
  
  add_action( 'wp_enqueue_scripts', 'theme_light', 30 );
  function theme_light() {
  
  
  
  wp_enqueue_style( 'lightbox', get_stylesheet_directory_uri() . '/css/lightbox.css', array(), '4.3.0' );
  wp_enqueue_script( 'lightbox2',  get_stylesheet_directory_uri() . '/js/lightbox.js', array( 'jquery' ), '3.3.0', true );
  
      wp_enqueue_script('swiper', get_stylesheet_directory_uri(). '/js/hammer.min.js', array('jquery'), '3.3.0', true);
      wp_enqueue_script('swiper1', get_stylesheet_directory_uri(). '/js/jquery.hammer.js', array('jquery'), '3.3.0', true);
  
  
  
  }
  
  
  
  
  // END ENQUEUE PARENT ACTION
  
  
  
  
  if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
      function chld_thm_cfg_parent_css() {
          wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'bootstrap','font-awesome' ) );
      }
  endif;
  add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', 10 );
  
  add_action( 'wp_enqueue_scripts', 'theme_name_scripts', 20 );
  function theme_name_scripts() {
      wp_dequeue_script( 'simpleshift_public' );
      wp_enqueue_script( 'myscript', get_stylesheet_directory_uri() .'/js/public.js', array( 'jquery' ), '1.0', true);
  }
  
  add_action('wp_head','my_conditional_script',0);
  
  
  function my_conditional_script() {
      if ( is_page('magdalena-morey') || ('ophelia-redpath') || ('john-glover') ) {
          remove_action('wp_enqueue_scripts', array('easyFancyBox', 'enqueue_styles'), 999);
          remove_action('wp_head', array('easyFancyBox', 'main_script'), 999);
          remove_action('wp_print_scripts', array('easyFancyBox', 'register_scripts'), 999);
          remove_action('wp_footer', array('easyFancyBox', 'enqueue_footer_scripts'));
          remove_action('wp_footer', array('easyFancyBox', 'on_ready'), 999);
      }
  }
  </code></pre>
  
  <p>And i have the following bit of script in my public.js file</p>
  
  <pre><code>$('#lightbox').hammer().on("swipe", function (event) {
                  if (event.gesture.direction === 4) {
                      $('#lightbox a.lb-prev').trigger('click');
                  } else if (event.gesture.direction === 2) {
                      $('#lightbox a.lb-next').trigger('click');
                  }
              });
  
  
  });
  </code></pre>
  
  <p>So i get no errors on the site but nothing happens. No mobile swipe functionality currently exists. </p>