我可以帮助您进行翻译。以下是您需要翻译的内容:
我有一系列链接被生成,其中一些具有空的href。 我想使用Jquery和/或CSS将空白链接隐藏起来,甚至可能出现#。
链接的样式如下:
<a class="Highlighted" id="hyperlinkViewProfile" href="">text to hide</a>
A[href=""], A[href="#"], A:not([href]) {
display: none;
}
A[href~="#"]
。{{链接1:演示}}
$('a').filter(function(){return $(this).attr('href') === "" || $(this).attr('href') === "#"}).hide();
$("a[href=''], a:not([href])").hide();
可以修改选择器,使其包括 #
链接:
$("a[href=''], a:not([href]), a:[href='#']").hide();