[英]activate and deactivate nav-link bootstrap in html jquery?
I have 2 links, one is for upload a report and the other to preview.. at first the second one is disabled because i put it in the class but then when i upload the report i want to enable this link with jquery in the event, Im trying to do something like this but i can´t我有 2 个链接,一个用于上传报告,另一个用于预览。起初第二个链接被禁用,因为我把它放在 class 但是当我上传报告时,我想在事件中使用 jquery 启用此链接,我试图做这样的事情,但我不能
$("#linkPreview").prop( "disabled", false );
.html .html
<li class="nav-title"> Report</li>
<li class="nav-item">
<a class="nav-link" href="/#upload">
<i class="nav-icon icon-notebook"></i>
Upload Report
</a>
<a class="nav-link disabled" id="linkPreview" href="/#preview">
<i class="nav-icon icon-notebook"></i>
Preview Report
</a>
</li>
Maybe is better to disable with jquery at document.ready function and enable in the event but also i don´t find the way to do..也许最好在 document.ready function 处使用 jquery 禁用并在事件中启用,但我也没有找到办法。
Thanks in advance.提前致谢。
Finally using the function removeClass it works!最后使用 function removeClass 它工作!
$("#linkPreview").removeClass("disabled");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.