How to set invisible false only a charator of a string using js or JQuery
I am ha开发者_开发技巧ving a string
"Custormer1#-#Project1".
I want to invisible the two #s in the string? Can I do this without replacing the character using javascript or JQuery?
The only option you have is to wrap them in a <span>
-element and hide that span with CSS.
Check this fiddle for an example: http://jsfiddle.net/CJefw/ and note that the text() method in jquery still returns the right content, without the added spans.
you can use jquery with map
the original string array and in the map you can ignore the char.
so the original string wont be affected
that way - you wont replace the chars....
精彩评论