Title: Code Placement&#8230;
Last modified: August 20, 2016

---

# Code Placement…

 *  [sunnydeville](https://wordpress.org/support/users/sunnydeville/)
 * (@sunnydeville)
 * [13 years ago](https://wordpress.org/support/topic/code-placement/)
 * Hi,
 * Im having a little difficulty trying to figure out were the second part of the
   code shown below goes..
 *     ```
       document.addEventListener('mouseover',hoverVideo,false);
       var vid = document.getElementById('video-example');
   
       function hoverVideo(a)
       {
           if(a.target == vid)
           {
               vid.play();
               this.addEventListener('mouseout',hideVideo,false);
           }
   
       }
   
       function hideVideo(e)
       {
           if(e.target == vid)
           {
               vid.pause();
           }
   
       }
       </blockquote>
       Which is to activate a Hover over effect for a video which is this code..
   
       <blockquote><!doctype html>
       <html lang="en">
       <head>
       </head>
   
       <body>
   
           <div id="wrapper">
               <video id="video-example" width="100" height="100" poster="http://urchn.org/wp/wp-content/uploads/2010/04/bbb-splash.png" loop="true">
                   <source src="http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg" type="video/ogg"></source>
               </video>
               </div><!--end wrapper-->
   
       </body>
       </html>
       ```
   
 * Where would i place the first code to activate the second code when placed in
   the post or page? ive tried to place it in the Function.php as well as the Header
   and Footer but all i get is a string error

The topic ‘Code Placement…’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [sunnydeville](https://wordpress.org/support/users/sunnydeville/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/code-placement/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
