title: Wordpress and Lazy load, I can't get it working
body: <p>I am trying to get lazy load js working in a wordpress site and can not for the life of me get it working. I tried the plugin's and while they work they lazy load all images and I can't have that happen on my homepage (long story, but it causes a jumping issue). I only want to lazy load images on specific pages. In the past I would simply link to the js file and add the class lazy to the images I wanted, but that obviously won't work. Here is what I tired...</p>
  
  <p><strong>functions.php</strong></p>
  
  <pre><code>function load_lazyload() {
      wp_register_script( 'lazyload', get_template_directory_uri() . '/library/js/jquery.lazyload.min.js', array(), '', true );
      wp_register_script( 'trigger_lazy', get_template_directory_uri() . '/library/js/lazy_trigger.js', array('jquery', 'lazyload'), '', true );
      wp_enqueue_script( 'trigger_lazy' );
  }
  add_action( 'wp_enqueue_scripts', 'load_lazyload' );
  </code></pre>
  
  <p>Then added this to lazy_trigger.js</p>
  
  <pre><code>jQuery(document).ready(function($) {
  $("img.lazy").lazyload({
      effect : "fadeIn"
  });
  </code></pre>
  
  <p>});</p>
  
  <p>Then I added the class lazy to the images I wanted to load. </p>
  
  <p>No luck getting this to work. Can someone explain why or better yet explain a better way?</p>