PageSourceSearch

http://physio-barthel.de/js/jquery.validateOnSubmit.js

js physio-barthel.de collected 2026-10-07 03:34:32 UTC 732 bytes, 19 lines download raw bytes

1(function( $ ) {
2    $.fn.validateOnSubmit = function() {
3 		$(this).submit(function( event ) {
4			$(this).find(".missing").removeClass("missing");
5			var empty =  $(this).find(".required :input").map( function() {
6 				if($( this ).val() == "") return (this);
7 			});
8			var unchecked =  $(this).find(".required input[type='radio'], .required input[type='checkbox']").map( function() {
9				if($(this).parents("form").find("input[name='" + $( this ).attr('name') + "']:checked").length == 0) {
10					return (this);
11				}
12 			});
13    		$(empty).add(unchecked).each(function() {
14 				$(this).parents(".required").addClass("missing");
15 			});
16			if(empty.add(unchecked).length > 0) event.preventDefault();
17	    });
18    };
19}( 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.