2
<div class="span9">
<span class="disabled">&lt;&lt; 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 &gt;&gt;</a></span>

I want to delete '|' sign after span. I am using cakephp pagination . Is it possible to delete thought css or jquery or javascript. Automatically its taking | sign from library pagination.

1
  • I don't think it is possible as it is a text node which is in a element with other element children... and since text nodes can't be styled you might not be able to have a pure css fix, though you could use javascript to remove that node... Commented Feb 20, 2015 at 5:36

5 Answers 5

3

You can remove all the unwraped elements like this,

$('.span9').html($('.span9').children());

Fiddle

2

i think this is the easiest way to replace your | in span text hopefully you may use this

 $(".span9").html($(".span9").html().split('|').join(""));

try this Fiddle

1
  • This would be the approach i would take.. simply copying your div contents back with out the pipes..
    – Angry 84
    Commented Feb 20, 2015 at 5:56
1

I think a solution where the | is replaced with is what you are looking for, then

$('span.numbers').each(function(){
    var next = this.nextSibling;
    if(next && next.nodeType==3 && next.nodeValue.trim()=='|'){
        next.nodeValue = ' ';
        //or this.parentNode.removeChild(next);
    }
})

Demo: Fiddle

0

You can set font-size to 0 of the div and add font-sizes to spans.

div { font-size: 0px}
div span { font-size: 14px;padding: 3px;}

Fiddle

0

You can hide the span9 and make the other spans visible.

.span9 {
visibility: hidden;
}

.span9 span {
visibility: visible;
}