ollie007 Posted June 8, 2009 Share Posted June 8, 2009 <script type="text/javascript"> AudioPlayer.embed("audioplayer_1", { soundFile: "http://yoursite.com/path/to/mp3_file_1.mp3" }); </script> Link to comment https://forums.phpfreaks.com/topic/161356-solved-how-to-wrap-this-up-in-a-function-and-replace-the-element/ Share on other sites More sharing options...
KevinM1 Posted June 8, 2009 Share Posted June 8, 2009 <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?"; Link to comment https://forums.phpfreaks.com/topic/161356-solved-how-to-wrap-this-up-in-a-function-and-replace-the-element/#findComment-851489 Share on other sites More sharing options...
ollie007 Posted June 8, 2009 Author Share Posted June 8, 2009 <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) Link to comment https://forums.phpfreaks.com/topic/161356-solved-how-to-wrap-this-up-in-a-function-and-replace-the-element/#findComment-851500 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.