[英]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.