第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

無法自定義交互式 JavaScript 內(nèi)容

無法自定義交互式 JavaScript 內(nèi)容

我們正在使用 Moodle 3.5 版并使用 H5P 插件制作交互式視頻。我們需要在提交按鈕上添加另一個操作請檢查鏈接https://h5p.org/interactive-video?;卮饐栴}后,會出現(xiàn)如下摘要屏幕:<script>function checkclick(){    $(document).ready(function(){        $(".h5p-interactive-video-endscreen-submit-button").click(function(){            alert("submitted");        });     });}$(document).ready(function(){    iframe=H5P.$body.contents();    iframe.find(".h5p-interactive-video-endscreen-submit-button").click(function(){          alert("hello");    });});// H5P.$body.contents().find(".h5p-interactive-video-endscreen-submit-button")// $(document).ready(function(){//        var button= H5P.$body.contents().find(".h5p-interactive-video-endscreen-submit-button");//     button.attr("id","myclass");//        console.log(button);// });</script>已嘗試上述技術(shù)以在單擊按鈕時獲得警報但沒有成功。
查看完整描述

2 回答

?
白板的微信

TA貢獻1883條經(jīng)驗 獲得超3個贊

改變這個:


$(document).ready(function(){

    iframe=H5P.$body.contents();

    iframe.find(".h5p-interactive-video-endscreen-submit-button").click(function(){

      alert("hello");

    });

});

對此:


$(document).ready(function(){

    iframe=H5P.$body.contents();

    $(document).on('click',function(){

        if(iframe.find(".h5p-interactive-video-endscreen-submit-button").is(":hover")){

          alert('hello');

        }

    });

});

如果無法檢測到元素點擊并且它有效,我通常會這樣做。


查看完整回答
反對 回復(fù) 2021-10-14
  • 2 回答
  • 0 關(guān)注
  • 223 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號