I have the following problem. I have this js code:
// Tooltip
$("#sel-tooltip").select(function startTooltip(){
$(function() {
$('.tooltip-icon').tooltip({
placement: 'top',
title: 'Sinta-se em casa!'
});
});
});
I want to do that, when clicking inside the input (sel-tooltip), a tooltip appears on another area of the same page on top of an element. That is, by clicking inside the input to type, the tooltip appears on top of that other element. How can I do it?
1 - Where it will appear
<i class="glyphicon glyphicon-map-marker glyp-search tooltip-icon"></i>
2 - Where to hold the event to appear
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-3">
<div class="form-group">
<input type="hidden" name="inline" value="">
<select name="cidade-busca" class="combobox form-control input-lg" tabindex="1" style="display: none; height: 62px;">
<option value="" selected="selected">Selecione seu estado</option>
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="ES">Espírito Santo</option>
<option value="GO">Goiás</option>
<option value="MA">Maranhão</option>
<option value="MT">Mato G.</option>
<option value="MS">Mato G. do Sul</option>
<option value="MG">Minas Gerais</option>
<option value="PA">Pará</option>
<option value="PB">Paraíba</option>
<option value="PR">Paraná</option>
<option value="PE">Pernambuco</option>
<option value="PI">Piauí</option>
<option value="RJ">Rio de Janeiro</option>
<option value="RN">Rio G. do Norte</option>
<option value="RS">Rio G. do Sul</option>
<option value="RO">Rondônia</option>
<option value="RR">Roraima</option>
<option value="SC">Santa Catarina</option>
<option value="SP">São Paulo</option>
<option value="SE">Sergipe</option>
<option value="TO">Tocantins</option>
</select>
</div>
</div>
LINK NO JSFiddle: link