function addClicklupe() { $('.ui-autocomplete-input').each(function(){ var elnext = $(this).next(); if($(elnext).is('a') && $(elnext).html() == 'X') { $(elnext).after(''); } else { $(this).after(''); } }); } function lupeclickevent() { $('.ui-autocomplete-input').each(function(){ if($(this).css('display') == 'none')$(this).next('.autocomplete_lupe').hide(); }); $('*').each(function(){ $(this).on('click',function(){ if($(this).hasClass('autocomplete_lupe')) { $('.ui-autocomplete-input').each(function(){ if($(this).val() === ' ') { $(this).val(''); $(this).trigger('keydown'); } }); blockclick = true; lastlupe = this; var el = this; //var height = $(window).scrollTop(); var found = false; $(el).prev('.ui-autocomplete-input').each(function(){ //var v = $(this).val(); found = true; aktlupe = this; $(this).val(' '); $(this).trigger('keydown'); //if(v !== '')setTimeout(trimel, 1500,this); //setTimeout(function(){$(window).scrollTop(height);},100); }); if(!found) { $(el).prev('a').prev('.ui-autocomplete-input').each(function(){ found = true; aktlupe = this; $(this).val(' '); $(this).trigger('keydown'); }); } setTimeout(function(){blockclick = false;},200); } else { if(this !== lastlupe) { if(!blockclick) { $('.ui-autocomplete-input').each(function(){ if($(this).val() === ' ') { $(this).val(''); $(this).trigger('keydown'); } }); } } } }); }); } /** * Hat Browser-Fenster den Focus? * * @return {boolean} */ function windowHasFocus() { return (typeof document.hasFocus === 'function') ? document.hasFocus() : false; } /** * Ist Browser-Fenster minimiert? * * @return {boolean} */ function windowIsMinimized() { var documentHiddenPropAvailable = typeof document.hidden !== 'undefined'; if (documentHiddenPropAvailable) { return document.hidden; } var msDocumentHiddenPropAvailable = typeof document.msHidden !== 'undefined'; if (msDocumentHiddenPropAvailable) { return document.msHidden; } var webkitDocumentHiddenPropAvailable = typeof document.webkitHidden !== 'undefined'; if (webkitDocumentHiddenPropAvailable) { return document.webkitHidden; } return false; } $(document).ready(function() { var $popupAttributes = $('#popupattributes'); if ($popupAttributes.length === 0) { return; } var popupattributes = JSON.parse($popupAttributes.html()); $('a.popup').click(function (e) { e.preventDefault(); var $this = $(this); var horizontalPadding = 30; var verticalPadding = 30; $('