PageSourceSearch

https://thinkkids.org/wp-content/themes/ThinkKid/js/search-ani.js?ver=1.0

js thinkkids.org collected 2026-09-24 09:54:04 UTC 1,817 bytes, 54 lines download raw bytes

1$(document).ready(function() {
2    $('.search-ani').each(function() {
3        var self = $(this);
4        var div = self.children('.field');
5        var placeholder = div.children('input').attr('placeholder');
6        var placeholderArr = placeholder.split(/ +/);
7        if (placeholderArr.length) {
8            var spans = $('<div />');
9            $.each(placeholderArr, function(index, value) {
10                spans.append($('<span />').html(value + '&nbsp;'));
11            });
12            div.append(spans);
13        }
14        self.click(function() {
15            self.addClass('open');
16            self.find('input').focus();
17            self.find('input').on('keyup', function() {
18                if ($(this).val().length > 3) {
19                    self.addClass('loading');
20                    $.get('/?s=' + $(this).val(), function(response) {
21                        $('#search-results').html(response);
22                        self.removeClass('loading');
23                    });
24                } else {
25                    $('#search-results').html('');
26                }
27            });
28        });
29        $(document).click(function(e) {
30            if (!$(e.target).is(self) && !jQuery.contains(self[0], e.target)) {
31                self.removeClass('open loading');
32                setTimeout(function() {
33                    self.find('input').val('');
34                    $('#search-results').html('');
35                }, 400);
36            }
37        });
38    });
39    //changePlaceholder();
40});
41
42//changePlaceholder();
43
44$(window).resize(function() {
45    //changePlaceholder();
46});
47
48function changePlaceholder() {
49    if ($(window).width() > 767) {
50        $('#search-field').attr('placeholder', 'Search for something...');
51    } else {
52        $('#search-field').attr('placeholder', 'Search');
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.