PageSourceSearch

https://www.foodincanada.com/wp-content/themes/strappress/js/responsive-scripts.js?ver=1.1.0

js foodincanada.com collected 2026-10-02 03:56:11 UTC 4,672 bytes, 132 lines download raw bytes

1/*!
2 * Responsive JS Library v1.1.0
3 */
4
5/**
6 * jQuery Friendly IE6 Upgrade Notice Plugin 1.0.0
7 *
8 * http://code.google.com/p/friendly-ie6-upgrade-notice/
9 *
10 * 
11 *
12 * http://www.gnu.org/licenses/gpl.html
13 */
14
15/**
16 * jQuery Scroll Top Plugin 1.0.0
17 */
18jQuery(document).ready(function ($) {
19    $('a[href=#scroll-top]').click(function () {
20        $('html, body').animate({
21            scrollTop: 0
22        }, 'slow');
23        return false;
24    });
25});
26
27/*
28* Placeholder plugin for jQuery
29* ---
30* Copyright 2010, Daniel Stocks (http://webcloud.se)
31* Released under the MIT, BSD, and GPL Licenses.
32*/
33(function($) {
34    function Placeholder(input) {
35        this.input = input;
36        if (input.attr('type') == 'password') {
37            this.handlePassword();
38        }
39        // Prevent placeholder values from submitting
40        $(input[0].form).submit(function() {
41            if (input.hasClass('placeholder') && input[0].value == input.attr('placeholder')) {
42                input[0].value = '';
43            }
44        });
45    }
46    Placeholder.prototype = {
47        show : function(loading) {
48            // FF and IE saves values when you refresh the page. If the user refreshes the page with
49            // the placeholders showing they will be the default values and the input fields won't be empty.
50            if (this.input[0].value === '' || (loading && this.valueIsPlaceholder())) {
51                if (this.isPassword) {
52                    try {
53                        this.input[0].setAttribute('type', 'text');
54                    } catch (e) {
55                        this.input.before(this.fakePassword.show()).hide();
56                    }
57                }
58                this.input.addClass('placeholder');
59                this.input[0].value = this.input.attr('placeholder');
60            }
61        },
62        hide : function() {
63            if (this.valueIsPlaceholder() && this.input.hasClass('placeholder')) {
64                this.input.removeClass('placeholder');
65                this.input[0].value = '';
66                if (this.isPassword) {
67                    try {
68                        this.input[0].setAttribute('type', 'password');
69                    } catch (e) { }
70                    // Restore focus for Opera and IE
71                    this.input.show();
72                    this.input[0].focus();
73                }
74            }
75        },
76        valueIsPlaceholder : function() {
77            return this.input[0].value == this.input.attr('placeholder');
78        },
79        handlePassword: function() {
80            var input = this.input;
81            input.attr('realType', 'password');
82            this.isPassword = true;
83            // IE < 9 doesn't allow changing the type of password inputs
84            if ($.browser.msie && input[0].outerHTML) {
85                var fakeHTML = $(input[0].outerHTML.replace(/type=(['"])?password\1/gi, 'type=$1text$1'));
86                this.fakePassword = fakeHTML.val(input.attr('placeholder')).addClass('placeholder').focus(function() {
87                    input.trigger('focus');
88                    $(this).hide();
89                });
90                $(input[0].form).submit(function() {
91                    fakeHTML.remove();
92                    input.show()
93                });
94            }
95        }
96    };
97    var NATIVE_SUPPORT = !!("placeholder" in document.createElement( "input" ));
98    $.fn.placeholder = function() {
99        return NATIVE_SUPPORT ? this : this.each(function() {
100            var input = $(this);
101            var placeholder = new Placeholder(input);
102            placeholder.show(true);
103            input.focus(function() {
104                placeholder.hide();
105            });
106            input.blur(function() {
107                placeholder.show(false);
108            });
109
110            // On page refresh, IE doesn't re-populate user input
111            // until the window.onload event is fired.
112            if ($.browser.msie) {
113                $(window).load(function() {
114                    if(input.val()) {
115                        input.removeClass("placeholder");
116                    }
117                    placeholder.show(true);
118                });
119                // What's even worse, the text cursor disappears
120                // when tabbing between text inputs, here's a fix
121                input.focus(function() {
122                    if(this.value == "") {
123                        var range = this.createTextRange();
124                        range.collapse(true);
125                        range.moveStart('character', 0);
126                        range.select();
127                    }
128                });
129            }
130        });
131    }
132})(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.