Would like to hide some text inside a div-block, but I don't want to hide the whole div element, because there are other elements inside, which I need.
Please suggest a solution using jquery.
Would like to hide some text inside a div-block, but I don't want to hide the whole div element, because there are other elements inside, which I need.
Please suggest a solution using jquery.
Span is the best way to divide the block level elements. Use span for the different section of the text you want to segregate and hide/show the span using jquery.
<div>
<span class="show"> text1 </span> <span class="hide"> text2 </span> <span class="show"> text3 </span>
</div>
<script>
$(".hide").hide();
</script>