http://jsbin.com/ekaqe
First click Euro (€), then a div shows up, the first problem is that if you click on the div, the div closes itself, and the other problem is, if you have 2 links to open divs they don't close itself, i need to click on the document page to close them Here is the JS: jQuery.fn.DivMenu = function(opcoes){ /** * Valores de defeito. **/ var variaveis = { 'display' : 'none', 'position' : 'absolute', 'background' : '#fff', 'border' : '1px solid #cecece', 'font-family' : 'Verdana, Arial, Helvetica, sans-serif', 'font-size' : '11px; padding: 5px; z-index: 999999' }; var opcoes = $.extend({}, variaveis, opcoes); /** end **/ /** * **/ return this.each(function(){ /** * Declarar variaveis. **/ var element = this; var offset = $(element).offset(); var left = offset.left; var top = offset.top; var currentId = $(this).attr('id'); var divDados = currentId + '-dados'; /** end **/ /** * **/ $(element).click(function(){ $('#' + divDados).hide(); $(this).next ().show(); return false; }); $(document.body).click(function(){ $('#' + divDados).hide(); }); /** end **/ /** * **/ $('#' + divDados).css({ 'left' : left + 'px', 'top' : top + 15 + 'px', 'display' : opcoes['display'], 'position' : opcoes['position'], 'background' : opcoes['background'], 'border' : opcoes['border'], 'font-family' : opcoes['font-family'], 'font-size' : opcoes['font_size'] }); /** end **/ }); /** end **/ }; On 13 Jun, 14:42, Charlie <charlie...@gmail.com> wrote: > get better response with a link to see the problem, jsbin works great , has > built in script libraries including jquery > Glazz wrote:nobody can help me out?