尝试禁用此跨度

<span id='downloadTestModal1' data-toggle="modal" data-target="#modalDownloadTestdata" class="fa fa-download"  onmouseover="" style="cursor: pointer;" title="Download" data-tooltip="tooltip" ></span>


到目前为止,已经尝试过了,但是id对我不起作用。

    $('#downloadTestModal1').unbind("click");
    $("#downloadTestModal1").attr("disabled", true);
    $('#downloadTestModal1').toggleClass("disabled");


还有其他方法吗?

最佳答案

http://jsfiddle.net/tw2L2ttw/1/

清除或设置“数据切换”以禁用或启用模式弹出

//## disable
$('#downloadTestModal1').attr('data-toggle','');

//## enable
$('#downloadTestModal1').attr('data-toggle','modal');

关于javascript - jQuery禁用跨度与数据切换,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27070153/

10-10 00:45
查看更多