PageSourceSearch

https://jazzpizza.ru/templates/dzhaz/javascript/jquery.form.js

js jazzpizza.ru collected 2026-10-02 02:06:43 UTC 6,388 bytes, 5 lines download raw bytes

1$(function(){initCustomForms();});function initCustomForms(){$('.sel:not(.outtaHere)').customSelect({selectStructure:'<div class="selectArea"><a href="#" class="selectButton"><span>&nbsp;</span></a><div class="center"></div><div class="disabled"></div></div>',optStructure:'<div class="selectOptions"><ul></ul></div>'});$('.rad:not(.outtaHere)').customRadio({radioStructure:'<div><span></span></div>'});$('.chk:not(.outtaHere)').customCheckbox();};(function(jQuery){jQuery.fn.customCheckbox=function(_options){var _options=jQuery.extend({checkboxStructure:'<div></div>',checkboxDisabled:'disabled',checkboxDefault:'checkboxArea',checkboxChecked:'checkboxAreaChecked',filterClass:'default'},_options);return this.each(function(){var checkbox=jQuery(this);if(!checkbox.hasClass('outtaHere')&&checkbox.is(':checkbox')&&!checkbox.hasClass(_options.filterClass)){var replaced=jQuery(_options.checkboxStructure);this._replaced=replaced;if(checkbox.is(':disabled'))replaced.addClass(_options.checkboxDisabled);else if(checkbox.is(':checked'))replaced.addClass(_options.checkboxChecked);else replaced.addClass(_options.checkboxDefault);replaced.click(function(){if(checkbox.is(':checked'))checkbox.removeAttr('checked');else checkbox.attr('checked','checked');changeCheckbox(checkbox);});checkbox.click(function(){changeCheckbox(checkbox);if(!checkbox.is(':checked'))checkbox.removeAttr('checked');else checkbox.attr('checked','checked');});checkbox.click(function(){changeCheckbox(checkbox);});replaced.insertBefore(checkbox);checkbox.addClass('outtaHere');}});function changeCheckbox(_this){_this.change();if(_this.is(':checked'))_this.get(0)._replaced.removeClass().addClass(_options.checkboxChecked);else _this.get(0)._replaced.removeClass().addClass(_options.checkboxDefault);}}
2jQuery.fn.customRadio=function(_options){var _options=jQuery.extend({radioStructure:'<div></div>',radioDisabled:'disabled',radioDefault:'radioArea',radioChecked:'radioAreaChecked',filterClass:'default'},_options);return this.each(function(){var radio=jQuery(this);if(!radio.hasClass('outtaHere')&&radio.is(':radio')&&!radio.hasClass(_options.filterClass)){var replaced=jQuery(_options.radioStructure);this._replaced=replaced;if(radio.is(':disabled'))replaced.addClass(_options.radioDisabled);else if(radio.is(':checked'))replaced.addClass(_options.radioChecked);else replaced.addClass(_options.radioDefault);replaced.click(function(){if(jQuery(this).hasClass(_options.radioDefault)){radio.attr('checked','checked');changeRadio(radio.get(0));}});radio.click(function(){if(!jQuery(this).hasClass(_options.radioDefault)){radio.attr('checked','checked');changeRadio(radio.get(0));}});radio.click(function(){changeRadio(this);});replaced.insertBefore(radio);radio.addClass('outtaHere');}});function changeRadio(_this){jQuery(_this).change();jQuery('input:radio[name='+jQuery(_this).attr("name")+']').not(_this).each(function(){if(this._replaced&&!jQuery(this).is(':disabled'))this._replaced.removeClass().addClass(_options.radioDefault);$(this).removeAttr('checked');});_this._replaced.removeClass().addClass(_options.radioChecked);}}
3jQuery.fn.customSelect=function(_options){var _options=jQuery.extend({selectStructure:'<div class="selectArea"><span class="left"></span><span class="center"></span><a href="#" class="selectButton"></a><div class="disabled"></div></div>',hideOnMouseOut:false,copyClass:true,selectText:'.center',selectBtn:'.selectButton',selectDisabled:'.disabled',optStructure:'<div class="optionsDivVisible"><div class="select-center"><ul></ul></div></div>',optList:'ul',filterClass:'default'},_options);return this.each(function(){var select=jQuery(this);if(!select.hasClass('outtaHere')&&!select.hasClass(_options.filterClass)){if(select.is(':visible')){var hideOnMouseOut=_options.hideOnMouseOut;var copyClass=_options.copyClass;var replaced=jQuery(_options.selectStructure);var selectText=replaced.find(_options.selectText);var selectBtn=replaced.find(_options.selectBtn);var selectDisabled=replaced.find(_options.selectDisabled).hide();var optHolder=jQuery(_options.optStructure);var optList=optHolder.find(_options.optList);if(copyClass)optHolder.addClass('drop-'+select.attr('class'));if(select.attr('disabled'))selectDisabled.show();select.find('option').each(function(){var selOpt=jQuery(this);var _opt=jQuery('<li><a href="#">'+selOpt.html()+'</a></li>');if(selOpt.attr('selected')){selectText.html(selOpt.html());_opt.addClass('selected');}_opt.children('a').on("click",function(){optList.find('li').removeClass('selected');select.find('option').removeAttr('selected');jQuery(this).parent().addClass('selected');selOpt.attr('selected','selected');selectText.html(selOpt.html());select.change();optHolder.hide();$(".selectArea").removeClass("selectFocus");return false;});
3optList.append(_opt);});replaced.width(select.outerWidth());replaced.insertBefore(select);optHolder.css({width:select.outerWidth()+2,display:'none',position:'absolute'});jQuery(document.body).append(optHolder);var optTimer;replaced.hover(function(){if(optTimer)clearTimeout(optTimer);},function(){if(hideOnMouseOut){optTimer=setTimeout(function(){optHolder.hide();},200);}});optHolder.hover(function(){if(optTimer)clearTimeout(optTimer);},function(){if(hideOnMouseOut){optTimer=setTimeout(function(){optHolder.hide();},200);}});selectBtn.on("click",function(){if(optHolder.is(':visible')){optHolder.hide();$(".selectArea").removeClass("selectFocus");}else{$(".selectArea").removeClass("selectFocus");$(this).parent().addClass("selectFocus");if(_activeDrop)_activeDrop.hide();optHolder.find('ul').css({maxHeight:'200',overflow:'auto'});optHolder.css({top:replaced.offset().top+replaced.outerHeight(),left:replaced.offset().left,display:'block'});if(optHolder.find('ul').height()>200)optHolder.find('ul').css({height:200,overflow:'auto'});_activeDrop=optHolder;}return false;});replaced.addClass(select.attr('class'));select.addClass('outtaHere');}}});}
4var _activeDrop;jQuery(function(){jQuery('body').click(hideOptionsClick)
5jQuery(window).resize(hideOptions)});function hideOptions(){if(_activeDrop&&_activeDrop.length){_activeDrop.hide();_activeDrop=null;}}function hideOptionsClick(e){if(_activeDrop&&_activeDrop.length){var f=false;jQuery(e.target).parents().each(function(){if(this==_activeDrop)f=true;});if(!f){$(".selectArea").removeClass("selectFocus");_activeDrop.hide();_activeDrop=null;}}}})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.