freddyw Posted December 8, 2009 Share Posted December 8, 2009 Hi there I know javascript isn't ideal for what im trying to do, but i know it is possable. I have an image and a sound. Lets call them image.jpg and sound.mp3 (those are the formats) What i want is when you click the image the mp3 file plays. I dont need a stop function just play. I have tried to acchieve this but ive given up. any help? please? Quote Link to comment https://forums.phpfreaks.com/topic/184463-onclick-play-sound/ Share on other sites More sharing options...
JustLikeIcarus Posted December 9, 2009 Share Posted December 9, 2009 Here is a jquery sound plugin http://view.jquery.com/trunk/plugins/sound/ Using jQuery with that plugin it would be something along the lines of $(#id_of_img).click(function(){ $.sound.play(url_of_file); }); Quote Link to comment https://forums.phpfreaks.com/topic/184463-onclick-play-sound/#findComment-974152 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.