Title: Helpful code snippets
Last modified: August 21, 2016

---

# Helpful code snippets

 *  Plugin Author [MatthewRuddy](https://wordpress.org/support/users/matthewruddy/)
 * (@matthewruddy)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/helpful-code-snippets/)
 * As Easing Slider contains many JS and PHP functions that users can hook into 
   when creating their own additional functionality, I’ve decided to make a topic
   where users can share their code snippets.
 * Here are two I find users asking for quite often. Add these to your theme’s header.
   php file before the </head>. You can also add these to your own Javascript files,
   or even into your footer.php file before the </body>.
 * **Pause slideshow on hover**
 *     ```
       <script type="text/javascript">
       jQuery(document).ready(function($) {
           $('.easingsliderlite').on('mouseenter', function() {
               $('.easingsliderlite').data('easingsliderlite').pausePlayback();
           });
           $('.easingsliderlite').on('mouseleave', function() {
               $('.easingsliderlite').data('easingsliderlite').resumePlayback();
           });
       });
       </script>
       ```
   
 * **End automatic playback after all slides have been shown**
 *     ```
       <script type="text/javascript">
           jQuery(document).ready(function($) {
               var inc = 0;
               $('.easingsliderlite').data('easingsliderlite').$el.on('nextslide', function() {
                   inc++;
                   if (inc == $('.easingsliderlite').data('easingsliderlite').count) {
                        $('.easingsliderlite').data('easingsliderlite').endPlayback();
                   }
               });
           });
       </script>
       ```
   
 * Feel free to share your own 🙂
 * [https://wordpress.org/plugins/easing-slider/](https://wordpress.org/plugins/easing-slider/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [styzer](https://wordpress.org/support/users/styzer/)
 * (@styzer)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/helpful-code-snippets/#post-4838326)
 * Hi Matthew, I totally love this slider! Thanks for making it and continuing support(
   not that there is much to be worried about).
 * I’m trying to find a way to only enable the slider on the home page. How could
   I do that?
 * Regards,
 * Andre
 *  [jaa123](https://wordpress.org/support/users/jaa123/)
 * (@jaa123)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/helpful-code-snippets/#post-4838355)
 * Hi,
    I have video about 3 minutes, format mpeg2. how do i add that on my website
   with out going thru youtube thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Helpful code snippets’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/easing-slider_262626.svg)
 * [Easing Slider](https://wordpress.org/plugins/easing-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easing-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easing-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/easing-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easing-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easing-slider/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [Pause on Hover](https://wordpress.org/support/topic-tag/pause-on-hover/)

 * 2 replies
 * 3 participants
 * Last reply from: [jaa123](https://wordpress.org/support/users/jaa123/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/helpful-code-snippets/#post-4838355)
 * Status: not a support question