[英]How to do jasmine test case for display none css property using documet.getElementById and getElementsByClassName
[英]how to do display none using css
<div class="span9">
<span class="disabled"><< previous</span><span class="current numbers">1</span> |
<span class="numbers"><a href="/index/page:2">2</a></span> |
<span class="numbers"><a href="/index/page:3">3</a></span>
<span class="next"><a href="/index/page:2" rel="next">next >></a></span>
我要刪除' | span
后簽字。 我正在使用cakephp分頁 。 是否可以刪除思想css
或jquery
或javascript
。 自動獲取| 庫分頁的標志。
我認為解決方案在哪里|
被替換為 是您想要的,然后
$('span.numbers').each(function(){
var next = this.nextSibling;
if(next && next.nodeType==3 && next.nodeValue.trim()=='|'){
next.nodeValue = ' ';
//or this.parentNode.removeChild(next);
}
})
演示: 小提琴
您可以將div的font-size設置為0並將字體大小添加到跨度。
div { font-size: 0px}
div span { font-size: 14px;padding: 3px;}
您可以隱藏span9並使其他范圍可見。
.span9 {
visibility: hidden;
}
.span9 span {
visibility: visible;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.