javascript - Wordpress - Video Popup Not Working -


i created own wp theme. added js carousel. in each part of carousel have description , video below it. can see here @ www.tvstartup.com problem video suppose pop play not work. in cases , in others not. here sample of code:

<div class="carousel_item">     <div class="image">         <img src="<?php echo get_template_directory_uri(); ?>/images/final/internet-tv.png" alt="internet tv" />     </div>     <div class="caption">         <h2>internet tv</h2>         <p>ut labore et dolore magna aliqua. ut enim ad minim  veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehender.</p>         <div class="btn-wrap">             <div class="button">                 pricing             </div>             <div class="button" id="contact">                 contact             </div>         </div>         <div id="internetvideocontainer" style="display:none;">             <a href="#" onclick="popup('internetvideocontainer'); stopinternetvideo();" style="cursor: pointer; font-size: 30px; color: red;">click close</a>             <video width="700" height="400" id="internetvideoplayer" controls>                 <source src="<?php echo get_template_directory_uri(); ? >/images/videos/welcometotvstartup.mp4" type="video/mp4">             </video>              <a href="#" onclick="popup('internetvideocontainer'); stopinternetvideo();" style="cursor: pointer; font-size: 30px; color: red;">click close</a>         </div>                                                          <a href="#" style="cursor: pointer" onclick="popup('internetvideocontainer'); playinternetvideo();">              <img src="<?php echo get_template_directory_uri(); ?>/images/watchimg.png" alt="click see video" class="internettvtumbnail" style="padding-top:45px; width:250; height:150px;">         </a>     </div> </div>       

any help,

thank you

the right way

            function load_my_script() {                 wp_enqueue_script( 'jquery' );             }             add_action( 'wp_enqueue_scripts', 'load_my_script' ); 

and change '$(' 'jquery('


not right way
add following code in header.php

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js"></script> 

the latter work suggest change code avoid further issues.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -