javascript - Dont work script in playlist template wordpress -


i want customize standart template playlist in wordpress this answer, , it: added 1 more field description on template.

<script type="text/html" id="tmpl-wp-playlist-current-item">     <# if ( data.image ) { #>     <img src="{{ data.thumb.src }}"/>     <# } #>     <div class="wp-playlist-caption">             <span class="wp-playlist-item-meta wp-playlist-item-title">&#8220;{{ data.title }}&#8221;</span>             <# if ( data.meta.album ) { #><span class="wp-playlist-item-meta wp-playlist-item-album">{{ data.meta.album }}</span><# } #>             <# if ( data.meta.artist ) { #><span class="wp-playlist-item-meta wp-playlist-item-artist">{{ data.meta.artist }}</span><# } #>             <# if ( data.description ) { #><a class="wp-playlist-item-meta wp-playlist-item-description">song text</a><# } #>     </div>     **<# if ( data.description ) { #>         <div class="wp-playlist-item-description-text">{{ data.description }}</div>     <# } #>** </script> 

and applyed css style div:

.wp-playlist-item-description-text {     position: absolute;     width: 350px;     z-index: 1;     background: #fff;     padding: 10px;     margin-left: 20px;     border: 1px solid #eee;     height: auto !important; } 

that see:

my output playlist

but cant applyed jquery scripts code , tags. want can show/hide element click, crome me, cant find it: 0 elements found selector.

jquery(function ($) {     $(".wp-playlist-item-description").click(function(){       $('.wp-playlist-item-description-text').slidetoggle();     }); }); 

can me please, guys?


Comments

Post a Comment

Popular posts from this blog

filehandler - java open files not cleaned, even when the process is killed -

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -