[英]how to hide other href links when we click any one href links , links are dynamic
function addChildAccord(childAccord) {
var abcde = childAccord.toString();
var element = document.createElement("input");
//Assign different attributes to the element.
element.setAttribute("type", "text");
element.setAttribute("name", "abcde");
element.setAttribute("id", "abcde");
element.setAttribute("value", abcde);
element.setAttribute("readonly", "readonly");
var createdElem = document.getElementById("filterElementId");
//Append the element in page (in span).
createdElem.appendChild(element);
}
function check(link) {
alert(link);
$(link).replaceWith($(link).text());
}
//這會創建動態鏈接,當用戶單擊任何鏈接時,我需要它,其他鏈接應隱藏或禁用$ {autnValue}
您可以通過添加一些類來隱藏鏈接
$('body').on('click','input',function(){
//Hide all links
$('input').addClass('hidden');
//Unhide clicked one
$(this).removeClass('hidden');
...
//other code
...
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.