开发者

How to set invisible false only a charator of a string using js or JQuery

开发者 https://www.devze.com 2023-04-08 14:37 出处:网络
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

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....

0

精彩评论

暂无评论...
验证码 换一张
取 消