| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- /*!
- * 视听说
- * author:andy
- * 2020-09-10
- */
- $(function () {
- $(".oralLanguageHide").hide();
- //音频播放
- $(".audioImg").on("click",function(){
- var curHtml = $(this).parent().find(".audioUrl").html();
- var curAlt = $(this).attr("alt");
- window.external.AudiovisualPlay(curAlt);
- });
- //视频播放
- $(".videoImg").on("click",function(){
- var curHtml = $(this).parent().find(".videoUrl").html();
- var curAlt = $(this).attr("alt");
- window.external.AudiovisualPlay(curAlt);
- });
- //答案控制
- $(".yaoshi").on("click",function(){
- try{
- var curDisplay = $(this).nextUntil(".yaoshi").find(".underlineContent").eq(0).css("display");
- if(curDisplay == "undefined"||curDisplay == undefined) return;
- if(curDisplay == "none"){
- $(this).nextUntil(".yaoshi").find(".underlineContent").show()
- }else{
- $(this).nextUntil(".yaoshi").find(".underlineContent").hide();
- }
- }catch (e) {
- }
- })
- })
- //样式控制
- $(function () {
- $(".left").on("mouseenter", ".yaoshi", function () {
- $(this).css("cursor", "pointer!important");
- var curDis = $(this).parent().find(".underlineContent").css("display");
- if (curDis == "inline") {
- $(this).attr("title", "隐藏答案");
- } else if (curDis == "none") {
- $(this).attr("title", "显示答案");
- }
- })
- $(".left").on("mouseenter", ".audioImg", function () {
- $(this).css("cursor", "pointer");
- $(this).attr("title", "播放音频");
- })
- $(".left").on("mouseenter", ".videoImg", function () {
- $(this).css("cursor", "pointer");
- $(this).attr("title", "播放视频");
- })
- $(".right").on("mouseenter", ".yaoshi", function () {
- $(this).css("cursor", "pointer!important");
- var curDis = $(this).parent().find(".underlineContent").css("display");
- if (curDis == "inline") {
- $(this).attr("title", "隐藏答案");
- } else if (curDis == "none") {
- $(this).attr("title", "显示答案");
- }
- })
- $(".right").on("mouseenter", ".audioImg", function () {
- $(this).css("cursor", "pointer");
- $(this).attr("title", "播放音频");
- })
- $(".right").on("mouseenter", ".videoImg", function () {
- $(this).css("cursor", "pointer");
- $(this).attr("title", "播放视频");
- })
- })
|