Q:

How to hide a text which has no tags, no id, no class?

I have that HTML :
<div id="google_translate_element">
    <div class="skiptranslate goog-te-gadget" dir="ltr">
        <div id=":0.targetLanguage">
            <select class="goog-te-combo">
                <option value="">Sélectionner une langue</option>
                <option value="en">Anglais</option>
                <option value="es">Espagnol</option>
                <option value="it">Italien</option>
            </select>
        </div>
        Fourni par&nbsp;<span style="white-space:nowrap">
        <a class="goog-logo-link" href="https://translate.google.com" target="_blank">
            <img src="https://www.gstatic.com/images/branding/googlelogo/1x/googlelogo_color_42x16dp.png" width="37px" height="14px" style="padding-right: 3px">Traduction</a>
        </span>
    </div>
</div>

My goal is to hide the 'Fourni par ' : problem is: it does not tagged, does not haev a specific classs or id ?

A:

jQuery solution :
You could filter the text using nodeType and remove the text :
$('.skiptranslate.goog-te-gadget').contents().filter(function(){
    return this.nodeType == 3
}).remove();

$('.skiptranslate.goog-te-gadget').contents().filter(function(){
    return this.nodeType == 3
}).remove()
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="google_translate_element">
  <div class="skiptranslate goog-te-gadget" dir="ltr">
    <div id=":0.targetLanguage">
      <select class="goog-te-combo">
        <option value="">Sélectionner une langue</option>
        <option value="en">Anglais</option>
        <option value="es">Espagnol</option>
        <option value="it">Italien</option>
      </select>
    </div>
    Fourni par&nbsp;<span style="white-space:nowrap">
    <a class="goog-logo-link" href="https://translate.google.com" target="_blank">
      <img src="https://www.gstatic.com/images/branding/googlelogo/1x/googlelogo_color_42x16dp.png" width="37px" height="14px" style="padding-right: 3px">Traduction</a>
    </span>
  </div>
</div>

CSS solution :
You could use the visibility attribute to collapse the text and let the div and link visible :

.skiptranslate.goog-te-gadget {
    visibility:collapse;
}

.skiptranslate.goog-te-gadget div,.skiptranslate.goog-te-gadget a{
    visibility:visible;
}
<div id="google_translate_element">
  <div class="skiptranslate goog-te-gadget" dir="ltr">
    <div id=":0.targetLanguage">
      <select class="goog-te-combo">
        <option value="">Sélectionner une langue</option>
        <option value="en">Anglais</option>
        <option value="es">Espagnol</option>
        <option value="it">Italien</option>
      </select>
    </div>
    Fourni par&nbsp;<span style="white-space:nowrap">
    <a class="goog-logo-link" href="https://translate.google.com" target="_blank">
      <img src="https://www.gstatic.com/images/branding/googlelogo/1x/googlelogo_color_42x16dp.png" width="37px" height="14px" style="padding-right: 3px">Traduction</a>
    </span>
  </div>
</div>

Hope this helps.

