Signin  Pricing  Examples  Support

Libraries > headroom_init.js

headroom_init.js - Search Live Website Code
It's like doing CTRL+F on millions of websites' source code



NerdyData is a search engine for source code. Search the source code of 200 million websites.


JAVASCRIPT FILE http://metisc.com/templates/rt_anacron/js/headroom_init.js


Libraries on metisc.com


mootools-mobile.js

rokmediaqueries.js

roksprocket.js

roksprocket.request.js

features.js

mosaic.js

script.js

browser-engines.js

bootstrap.min.js

jquery-migrate.min.js

jquery.min.js

jquery-noconflict.js

caption.js

core.js

mootools-core.js

mootools-more.js

rokmediaqueries.js

sidemenu.js

accordion.js

chart.js

headroom_init.js

headroom.js

metisc.js

rokmediaqueries.js

showcase.js



Explore More


logo.js

search.js

common.js

js.js

headroom_init.js
				
((function(global, $, Headroom){

    var FixedHeader = {
        init: function(){
            var header = $('rt-header-surround');
            if (!header) return;
            FixedHeader.headroom = new Headroom($('rt-header-surround'), {
                "tolerance": 5,
                "offset":    120,
                "classes": {
                    "initial":  "animated",
                    "pinned":   "slideDown",
                    "unpinned": "slideUp"
                }
            });

            if ('matchMedia' in window){
                var MQL = window.matchMedia('(max-width: 767px)');
                MQL.addListener(FixedHeader.mediaQuery);
                FixedHeader.mediaQuery(MQL);
            } else {
                FixedHeader.start();
            }
        },

        start: function(){
            FixedHeader.headroom.init();
        },

        stop: function(){
            FixedHeader.headroom.destroy();
        },

        mediaQuery: function(mql){
            FixedHeader[mql.matches ? 'stop' : 'start']();
        }
    };

    global.FixedHeader = FixedHeader;

    global.addEvent('domready', function(){
        FixedHeader.init();
    });

})(window, document.id, Headroom));


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z