2015-01-15 6 views
0

Это не полная html-страница! Плейлист отлично работает сам по себе, и он работает внутри моего html-файла, но я не знаю, как его встроить в тег div, называемый contentStory. Может ли кто-нибудь мне помочь? Я уверен, что это просто. Это путь? Должен ли $ ('body') быть абсолютным путем к тегу div? Вам технические разработчики, извините за такой тупой вопрос.embed query in div tag

<head> 
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script> 
<script type="text/javascript" src="../plugin/jquery-jplayer/jquery.jplayer.js"></script> 
<script type="text/javascript" src="../plugin/ttw-music-player-min.js"></script> 
<script type="text/javascript" src="js/myplaylist.js"></script> 

<script type="text/javascript"> 
    $(document).ready(function(){ 
     var description = 'This is ipsum dolor sit amet, consectetur adipiscing elit. Fusce id tortor nisi. Aenean sodales diam ac lacus elementum scelerisque. Suspendisse a dui vitae lacus faucibus venenatis vel id nisl. Proin orci ante, ultricies nec interdum at, iaculis venenatis nulla. '; 

     $('body').ttwMusicPlayer(myPlaylist, { 
      autoPlay:false, 
      description:description, 
      jPlayer:{ 
       swfPath:'music-player/plugin/jquery-jplayer' //You need to override the default swf path any time the directory structure changes 
      } 
     }); 
    }); 
    </script> 
    </head> 
    <body class="wireframe"> 
    <div id="page"> 
    <header>.....</header> 
    <div>….</div> 
    <div>….</div> 
    <div>….</div> 
    <div>….</div> 
    <div>….</div> 
    <div id="contentStory"></div> 
    <footer>….</footer> 

    </body> 
    </html> 
+0

Что на самом деле пытаетесь достичь? Опишите желаемый конечный результат. –

ответ

1

Используйте contentStory ID, чтобы найти его

$('#contentStory').ttwMusicPlayer(myPlaylist, { 
     autoPlay:false, 
     description:description, 
     jPlayer:{ 
      swfPath:'music-player/plugin/jquery-jplayer' //You need to override the default swf path any time the directory structure changes 
     } 
}); 
+0

Я хочу, чтобы этот звуковой плейлист отображался внутри html-страницы на веб-сайте. –

+0

Я хочу, чтобы этот звуковой плейлист отображался внутри html-страницы на веб-сайте. Я пробовал $ ('contentStory'), но когда я это делаю, весь плейлист исчезает вместе. http://www.morethanconquerorschurch.org/music-player/demo/index2.html –

+0

@Sheree Smith Я не собираюсь посещать ваш сайт, но если вы заново создадите свой сценарий в http://jsfiddle.net/, я буду посмотрите там. –