Realization of Music playback audition list based on jquery _jquery

Source: Internet
Author: User

This article for everyone to share the jquery implementation of the music playback audition list, you can achieve playback, pause, automatic access to audio path function, the specific contents are as follows

1.html file

<! DOCTYPE html> 
@author fucmlif//@date 2016/4/6//JQuery ("A.user_doplay"). Click (function () {var x = document.getElementById ("
 Myaudio "); if (x.paused) {jQuery ("A.user_doplay"). Find (' img '). attr (' src ', ' http://sandbox.runjs.cn/uploads/rs/424/shsayjwv/
  Play.png ');
  JQuery (This). FIND (' img '). attr (' src ', ' http://sandbox.runjs.cn/uploads/rs/424/shsayjwv/stop.png ');
  JQuery (This). attr ("name", "playing"); X.play (); Play} else if (X.play && jquery (this). attr ("name") = = "stoped") {jquery (' #myAudio '). attr (' src ', jQuery (this). A TTR (' id ') + '. mp3 ');//Modify the Audio path JQuery ("A.user_doplay"). Find (' img '). attr (' src ', ' http://sandbox.runjs.cn/uploads/rs/
  424/shsayjwv/play.png ');
  JQuery (This). FIND (' img '). attr (' src ', ' http://sandbox.runjs.cn/uploads/rs/424/shsayjwv/stop.png ');
  JQuery ("#play_list_ol"). Find (' a '). attr (' name ', ' stoped ');
  JQuery (This). attr ("name", "playing"); X.play (); Play} else if (X.play && jQuery (this). attr ("name") = = "playing") {JQuery (this). FIND (' img '). attr (' src ', ' http://sandbox.runjs.cn/uploads/rs/424/shsayjwv/play.png ');
  JQuery ("#play_list_ol"). Find (' a '). attr (' name ', ' stoped '); X.pause ();
 Pause} else {alert ("This hint should not appear");
 }
});

The above is the entire content of this article, I hope to help you learn.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.