Skip to content
Advertisement

Is there a way to hide chars on start point?

The “$$$” chars were used for get indexof and hide list in code behind. Now I want to ask is there a way to hide these chars with jQuery and/or JavaScript?

JavaScript

 

Advertisement

Answer

You could put them in an element like <span class="hide">$$$</span> and then use JQuery to hide the element using the following,

JavaScript

Another soution is to wrap the $$$ in a span tag and hide them using css as suggested by user5295483 comment. However I would suggest using a class name just in case you don’t want to hide all of your span tags.

HTML:

JavaScript

CSS:

JavaScript

If you want hide the $$$ using plain JavaScript? You can try the following:

Live Demo

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement