I have a modal window (display: none) and I need to display it on hover over a label.
How can I do this?
HTML
<div class="container"> <div class="modalTipo" id="loginModal" > <div class="modal-content2"> <div class="row"> <table style="background-color:#F3F3F3;color:green;"> <tr> <td class="col-md-4" style="background-color:#F3F3F3;color:green"> <span> AfirmeNet </span> </td> <td> <input type="radio" id="rPersonas"></td> <td><label class="form-check-label" for="flexRadioDefault1">Personas</label></td> <td> </td> <td><input type="radio" id="rEmpresas" > </td> <td><label class="form-check-label" for="flexRadioDefault1">Empresas </label> </td> </tr> <tr> <td class="col-md-4" style="background-color:#F3F3F3;color:green"><span> </span></td> <td colspan="2"><input type="text" placeholder="Personas" /></td> <td> </td> <td colspan="2"> <input type="submit" value="Entrar" class="btn btn-success" /></td> </tr> </table> </div> </div> </div>JS
function MostrarLoginModal() { $('#loginModal').show(); }The event I needed is MouseOver.
Add these lines to my JQuery code:
$("#_menu").mouseover(function () { $('#loginModal').show(); });