Jump to content

[SOLVED] How to wrap this up in a function and replace the element?


ollie007

Recommended Posts

    <script type="text/javascript">  
    AudioPlayer.embed("audioplayer_1", {  
        soundFile: "http://yoursite.com/path/to/mp3_file_1.mp3"
    });  
    </script>  

 

echo "Need more details, and some context, before anyone can help you out.";
echo "What element needs to be replaced?  How/where are you calling the embed function?";
echo "Also, you DO realize it's rude to simply write a block of code and say 'fix it,' right?";

 <p id="audioplayer_1">Alternative content</p>  

         <script type="text/javascript">  
         AudioPlayer.embed("audioplayer_1", {soundFile: "http://yoursite.com/path/to/mp3_file.mp3"});  
         </script> 

 

i would like to replace that element, unfortunately, the CMS i am using is parsing out, "onclick, JS" etc

 

so i need to wrap up the js in a simple funtion like

 

$('audioplayer_1').loadaudio($link, $title)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.