Quantcast
Channel: Hide element, but show CSS generated content - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by Sotiris for Hide element, but show CSS generated content

$
0
0

I don't think it's possible with pure css and html. Looking at this example http://jsbin.com/efeco4 you will see that what is inside content property of css, is wrapped by the element. So any manipulation of the element will affect the css content also.

So an alternative thought could be to use jquery, to empty the html content inside tag div with class hidetext without affect the content of css. A sample code could be this:

$('.hidetext').empty();

Example: http://jsbin.com/efeco4/2


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>