title: How to make a text hover to play a video
body: <p>I have a question about the JavaScript <code>onmouseover</code> event. I want to make a difficult <code>onmouseover</code> event to play a video. What I want to do is to play a video when I hover over a text.</p>
  <p>source: <a href="https://www.ferrari.com/" rel="nofollow noreferrer">https://www.ferrari.com/</a></p>
  <p>when you click on car and hover over one of the models you see what I mean.</p>
  <p>Thank you!</p>
  <p>The new information;</p>
  <p>my code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="text1"&gt;
      &lt;h1&gt;Nummer 1&lt;/h1&gt;
  &lt;/div&gt;
  
  &lt;div id="movie1"&gt;
      &lt;video width="320" height="240"&gt;
          &lt;source src="https://www.spiralex.nl/wp-content/uploads/2020/12/oil-and-gas-set-1cx2641.mp4" type="video/mp4"&gt;
      &lt;/video&gt;
  &lt;/div&gt;
  
  &lt;script type ="text/javascript"&gt;
  
      var text1 = document.getElementById = "text1"
      var movie1 = document.getElementById = "movie1"
      
      
      text1.onmousever = function(){
          movie1.play
      }
      
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I'm stuck in the mouseovereffect because i don't know how to link it with my video.... I'm also using Elementor pro with a HTML widget, maybe that's the issue.
  <strong>Screenshot source</strong>
  <img src="https://i.stack.imgur.com/96aPO.jpg" alt="Screenshot source" /></p>
  <p>this is the part I meant. When you're hover over a car model, the video about this model is starting to play.</p>