PageSourceSearch

https://www.babysfirsttest.org/sites/all/themes/bft_v2/js/jquery.inputTip.js?tkt3dx

js babysfirsttest.org collected 2026-10-02 15:11:15 UTC 1,858 bytes, 54 lines download raw bytes

1/**
2* inputTip - puts helper text in an input field
3*/
4(function($){
5$.fn.inputTip = function(options) {
6	var defaults = {
7		isReplacement:false,
8		passwordLabelEl:null 
9	};
10	// Extend our default options with those provided.
11	var opts = $.extend(defaults, options);
12	// If this is a password input then create a text input to be used as a label for replacement and store it to the options
13	var el = $(this);
14	if ($(this).attr('type') == 'password' && opts.passwordLabelEl == null) {
15		//MRD: In next line i moved the placement of "Replacement" text for the name attribute to the begining. This was to fix a bug for fields that used array notation. Ex: "login[password]" would not submit correctly because it submitted the Alt value for the accuall form value.
16		var newField = $('<input type="text" value="'+$(this).attr('alt')+'" class="'+$(this).attr('class')+'" name="Replacement'+$(this).attr('name')+'" id="'+$(this).attr('id')+'Replacement" alt="'+$(this).attr('alt')+'" />')
17		$(this).after(newField);
18		newField.hide();
19		newField.focus(function(){
20			$(this).hide();
21			el.show();
22			el.select();
23		});
24		opts.passwordLabelEl = newField;
25	}
26	// setup the focus and blur functions
27	$(this).focus(function(){
28		var el = $(this);
29		if (opts.passwordLabelEl != null) {
30			// do nothing here - focused on the password field
31		} 
32		else if (el.val() == el.attr('alt')) {
33			el.val('');
34		}
35	});
36	$(this).blur(function(){
37		var el = $(this);
38		if (opts.passwordLabelEl != null && el.val() == '') {
39			el.hide();
40			opts.passwordLabelEl.show();
41		}
42		else if (el.val() == '') {
43			el.val(el.attr('alt'));
44		}
45	});
46	if (!opts.isReplacement){
47		$(this).blur();
48	}
49};
50})(jQuery);
51/* usage -- just initialize fields like this and you're set - your field should have an alt tag
52$(document).ready(function(){ $('#ballardSearch input:text').inputTip(); });
53 */
54 

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.