<commit_before><!DOCTYPE html>
<html>
<head>
<style>
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0px;
    min-width: 940px;
}
body p {
    margin-top: 8px;
}
body ul {
    list-style: none;
    padding: 0px;
    margin: 0px;
}
.main {
    margin: 0 auto;
    width: 900px;
}
.banner {
    background-color: #333333;
    color: #fefefe;
    padding: 20px;
    padding-top: 80px;
    padding-bottom: 80px;
}
.title {
    font-size: 140%;
    font-weight: bold;
}
.header {
    background-color: #eee;
    padding: 20px;
}
.header.scroll-to-fixed-fixed {
    color: red;
}
.content {
    padding: 20px;
    overflow: hidden;
}
.footer {
    background-color: #eee;
    padding: 20px;
    clear: both;
}
.footer.scroll-to-fixed-fixed {
    color: red;
}
.footer-content {
    background-color: #aaa;
    padding: 20px;
}
.demos li {
    margin-bottom: 20px;
}
.left {
    float: left;
    width: 700px;
}
.right {
    float: left;
    margin-left: 20px;
}
.summary {
    border: 1px solid #dddddd;
    overflow: hidden;
    margin-top: 20px;
}
.summary .caption {
    border-bottom: 1px solid #dddddd;
    background-color: #dddddd;
    font-size: 12pt;
    font-weight: bold;
    padding: 5px;
}
.summary.scroll-to-fixed-fixed {
    margin-top: 0px;
}
.summary.scroll-to-fixed-fixed .caption {
    color: red;
}
.contents {
    width: 150px;
    margin: 10px;
    font-size: 80%;
}
</style>
<title>ScrollToFixed Plugin Demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
<script src="jquery-scrolltofixed.js" type="text/javascript"></script>
<script>
    $(document).ready(function() {

        // Dock the header to the top of the window when scrolled past the banner.
        // This is the default behavior.

        $('.header').scrollToFixed();


        // Dock the footer to the bottom of the page, but scroll up to reveal more
        // content if the page is scrolled far enough.

        $('.footer').scrollToFixed( {
            bottom: 0,
            limit: $('.footer').offset().top
        });


        // Dock each summary as it arrives just below the docked header, pushing the
        // previous summary up the page.

        var summaries = $('.summary');
        summaries.each(function(i) {
            var summary = $(summaries[i]);
            var next = summaries[i + 1];

            summary.scrollToFixed({
                marginTop: $('.header').outerHeight(true) + 10,
                limit: function() {
                    var limit = 0;
                    if (next) {
                        limit = $(next).offset().top - $(this).outerHeight(true) - 10;
                    } else {
                        limit = $('.footer').offset().top - $(this).outerHeight(true) - 10;
                    }
                    return limit;
                },
                zIndex: 999
            });
        });
    });
</script>
</head>
<body>
    <ul>
        <li class="banner">
            <div class="main"><span class="title">Banner</span><span> - This banner will scroll out of view.</span></div>
        </li>
        <li class="header">
            <div class="main"><span class="title">Header</span><span> - This header will dock to the top of the window.</span></div>
        </li>
        <li class="content main">
            <ul>
                <li class="left">
                    <h1>ScrollToFixed Demo</h1>
                </li>
                <li class="left">
                    <h2>What?</h2>

                    <p>This jQuery plugin is used to fix elements on the page (top, bottom, anywhere); however, it still allows the element to continue to move left or right with the horizontal scroll.</p>

                    <p>Given an option marginTop, the element will stop moving vertically upward once the vertical scroll has reached the target position; but, the element will still move horizontally as the page is scrolled left or right. Once the page has been scrolled back down past the target position, the element will be restored to its original position on the page.</p>

                    <p>This plugin has been tested in Firefox 3+, Google Chrome 10+, Safari 5+, Internet Explorer 8/9, and Opera 11.60+.</p>

                    <p>This plugin was inspired by the excellent tutorial presented by <NAME>, titled &quot;Fixed Floating Elements&quot;.  You will find that tutorial <a href="http://jqueryfordesigners.com/fixed-floating-elements/">here</a>.</p>

                    <h2>How?</h2>

                    <p>You can get the plugin <a href="https://github.com/bigspotteddog/ScrollToFixed">here</a>.</p>

                    <p>The code below fixes the header to the top of the window and the footer to the bottom of the window.  The footer will reveal more content once the window is scrolled low enough.  Three summary elements on the right follow their respective sections, docking at the top of the window until the next section arrives.  Once the footer is undocked, it will push the last summary up the page to reveal its contents.</p>

                    <pre>
    $(document).ready(function() {

        // Dock the header to the top of the window when scrolled past the banner.
        // This is the default behavior.

        $('.header').scrollToFixed();


        // Dock the footer to the bottom of the page, but scroll up to reveal more
        // content if the page is scrolled far enough.

        $('.footer').scrollToFixed( {
            bottom: 0,
            limit: $('.footer').offset().top
        });


        // Anchor the summaries to their respective sections.

        var h2 = $('h2');
        $('#summary1').css({ position: 'absolute', top: $(h2[0]).offset().top });
        $('#summary2').css({ position: 'absolute', top: $(h2[3]).offset().top });
        $('#summary3').css({ position: 'absolute', top: $(h2[10]).offset().top });


        // Dock each summary as it arrives just below the docked header, pushing the
        // previous summary up the page.

        $('.summary').scrollToFixed({
            marginTop: $('.header').outerHeight(true) + 10,
            limit: function() {
                var self = $(this);
                var next = $(self.next());
                var limit = 0;
                if (next.length > 0) {
                    limit = next.offset().top - self.outerHeight(true) - 10;
                } else {
                    limit = $('.footer').offset().top - self.outerHeight(true) - 10;
                }

                return limit;
            },
            zIndex: 999
        });
    });
</pre>             
                    <p>The rest of this is all Greek to me :)</p>

                    <p>Orci id gravida per neque nibh. Nullam sit commodo tincidunt et diam vitae pharetra sed. Tempus sit sodales. Voluptatem wisi mattis inceptos tellus dolor rhoncus sed et eu turpis torquent ligula eu dui lorem nec accumsan platea lacinia ac. Non faucibus per sit in vehicula magna lacus deleniti. Tincidunt per aliquam. Vestibulum adipiscing laoreet eget eros commodo. Laoreet molestie a eros in nec sed justo venenatis. Eu lorem gravida. Nisl non a sociis convallis leo. Est nunc nisl porta dignissim turpis. Sapien sed nulla. Amet mi diam. Sem risus accumsan. Posuere viverra convallis. Est at netus. Tortor eget quam. Wisi nulla erat vestibulum tempor eu hendrerit vel dolor. Aliquam magnis sed etiam felis eros.</p>

                    <h2>Scelerisque in justo neque ultricies vel eget libero quam vitae metus ante nonummy amet augue</h2>

                    <p>Velit tellus enim. Vitae et ultrices. Odio torquent ligula. Quam in a scelerisque malesuada non. Sem enim congue sed odio libero. Lacinia commodo feugiat sed nonummy lobortis erat maecenas vivamus. Lectus diam pede. Eget risus mauris. In dapibus libero suspendisse pellentesque urna. Id metus libero. Metus id accumsan curabitur id congue. Elementum diam placerat posuere vivamus felis. Arcu ante vestibulum. Orci ut ut magna nibh eu aliquam mi qui vel pretium nullam. Tellus ligula malesuada. Consequat id nulla. Feugiat suscipit ligula dolor amet congue urna etiam amet accumsan consequat distinctio natoque placerat nec. Eget lectus mauris molestie fusce dui. Vel consectetuer imperdiet tempus at sed. Proin aliquam nec. Ligula sit elit eget faucibus cras arcu in rhoncus. Lorem id integer. Vestibulum nec cum. Ligula aliquam tellus elit nisl lectus in diam tortor wisi mauris tempus.</p><p>Fermentum ipsum augue. Lectus in nunc vulputate tellus neque tortor erat cursus. Congue wisi enim. Nam eget dui auctor amet quis donec ipsum nibh. Nisl leo magna officia leo nibh.</p>

                </li>
                <li class="right">
                    <ul id="summary1" class="summary">
                        <li class="caption">Summary 1</li>
                        <li class="contents">
                            <p>There are three floating summaries on the right of this page.  They are anchored to their respective sections.</p>

                            <p>Once a summary reaches the bottom of the header above, it will stop there until the next section summary arrives.  Then, it will continue up the page.</p>

                            <p>The last summary will get pushed up the page by the footer once it undocks to reveal the content below it.</p>
                        </li>
                    </ul>
                </li>
                <li class="left">
                    <h2>Mollis in ornare</h2>

                    <p>Nec a ut. Ut nullam urna. Quis tortor mauris blandit non corrupti. Rutrum in at id dignissim dictum. Duis ac ornare parturient ultrices amet odio feugiat aenean cras mus pede. Praesent egestas netus. Urna esse pharetra commodi commodo curabitur. A lacinia sed etiam ut vel maxime platea porta odio mollis non nisl nulla nullam. Vitae impedit pulvinar.</p><commit_msg>See #161: Removed the fixed position support check as it is not working.<commit_after><!DOCTYPE html>
<html>
<head>
<style>
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0px;
    min-width: 940px;
}
body p {
    margin-top: 8px;
}
body ul {
    list-style: none;
    padding: 0px;
    margin: 0px;
}
.main {
    margin: 0 auto;
    width: 900px;
}
.banner {
    background-color: #333333;
    color: #fefefe;
    padding: 20px;
    padding-top: 80px;
    padding-bottom: 80px;
}
.title {
    font-size: 140%;
    font-weight: bold;
}
.header {
    background-color: #eee;
    padding: 20px;
}
.header.scroll-to-fixed-fixed {
    color: red;
}
.content {
    padding: 20px;
    overflow: hidden;
}
.footer {
    background-color: #eee;
    padding: 20px;
    clear: both;
}
.footer.scroll-to-fixed-fixed {
    color: red;
}
.footer-content {
    background-color: #aaa;
    padding: 20px;
}
.demos li {
    margin-bottom: 20px;
}
.left {
    float: left;
    width: 700px;
}
.right {
    float: left;
    margin-left: 20px;
}
.summary {
    border: 1px solid #dddddd;
    overflow: hidden;
    margin-top: 20px;
}
.summary .caption {
    border-bottom: 1px solid #dddddd;
    background-color: #dddddd;
    font-size: 12pt;
    font-weight: bold;
    padding: 5px;
}
.summary.scroll-to-fixed-fixed {
    margin-top: 0px;
}
.summary.scroll-to-fixed-fixed .caption {
    color: red;
}
.contents {
    width: 150px;
    margin: 10px;
    font-size: 80%;
}
</style>
<title>ScrollToFixed Plugin Demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
<script src="jquery-scrolltofixed.js" type="text/javascript"></script>
<script>
    $(document).ready(function() {

        // Dock the header to the top of the window when scrolled past the banner.
        // This is the default behavior.

        $('.header').scrollToFixed();


        // Dock the footer to the bottom of the page, but scroll up to reveal more
        // content if the page is scrolled far enough.

        $('.footer').scrollToFixed( {
            bottom: 0,
            limit: $('.footer').offset().top
        });


        // Dock each summary as it arrives just below the docked header, pushing the
        // previous summary up the page.

        var summaries = $('.summary');
        summaries.each(function(i) {
            var summary = $(summaries[i]);
            var next = summaries[i + 1];

            summary.scrollToFixed({
                marginTop: $('.header').outerHeight(true) + 10,
                limit: function() {
                    var limit = 0;
                    if (next) {
                        limit = $(next).offset().top - $(this).outerHeight(true) - 10;
                    } else {
                        limit = $('.footer').offset().top - $(this).outerHeight(true) - 10;
                    }
                    return limit;
                },
                zIndex: 999
            });
        });
    });
</script>
</head>
<body>
    <ul>
        <li class="banner">
            <div class="main"><span class="title">Banner</span><span> - This banner will scroll out of view.</span></div>
        </li>
        <li class="header">
            <div class="main"><span class="title">Header</span><span> - This header will dock to the top of the window.</span></div>
        </li>
        <li class="content main">
            <ul>
                <li class="left">
                    <h1>ScrollToFixed Demo</h1>
                </li>
                <li class="left">
                    <h2>What?</h2>

                    <p>This jQuery plugin is used to fix elements on the page (top, bottom, anywhere); however, it still allows the element to continue to move left or right with the horizontal scroll.</p>

                    <p>Given an option marginTop, the element will stop moving vertically upward once the vertical scroll has reached the target position; but, the element will still move horizontally as the page is scrolled left or right. Once the page has been scrolled back down past the target position, the element will be restored to its original position on the page.</p>

                    <p>This plugin has been tested in Firefox 3+, Google Chrome 10+, Safari 5+, Internet Explorer 8/9, and Opera 11.60+.</p>

                    <p>This plugin was inspired by the excellent tutorial presented by <NAME>, titled &quot;Fixed Floating Elements&quot;.  You will find that tutorial <a href="http://jqueryfordesigners.com/fixed-floating-elements/">here</a>.</p>

                    <h2>How?</h2>

                    <p>You can get the plugin <a href="https://github.com/bigspotteddog/ScrollToFixed">here</a>.</p>

                    <p>The code below fixes the header to the top of the window and the footer to the bottom of the window.  The footer will reveal more content once the window is scrolled low enough.  Three summary elements on the right follow their respective sections, docking at the top of the window until the next section arrives.  Once the footer is undocked, it will push the last summary up the page to reveal its contents.</p>

                    <pre>
    $(document).ready(function() {

        // Dock the header to the top of the window when scrolled past the banner.
        // This is the default behavior.

        $('.header').scrollToFixed();


        // Dock the footer to the bottom of the page, but scroll up to reveal more
        // content if the page is scrolled far enough.

        $('.footer').scrollToFixed( {
            bottom: 0,
            limit: $('.footer').offset().top
        });


        // Dock each summary as it arrives just below the docked header, pushing the
        // previous summary up the page.

        var summaries = $('.summary');
        summaries.each(function(i) {
            var summary = $(summaries[i]);
            var next = summaries[i + 1];

            summary.scrollToFixed({
                marginTop: $('.header').outerHeight(true) + 10,
                limit: function() {
                    var limit = 0;
                    if (next) {
                        limit = $(next).offset().top - $(this).outerHeight(true) - 10;
                    } else {
                        limit = $('.footer').offset().top - $(this).outerHeight(true) - 10;
                    }
                    return limit;
                },
                zIndex: 999
            });
        });
    });
</pre>             
                    <p>The rest of this is all Greek to me :)</p>

                    <p>Orci id gravida per neque nibh. Nullam sit commodo tincidunt et diam vitae pharetra sed. Tempus sit sodales. Voluptatem wisi mattis inceptos tellus dolor rhoncus sed et eu turpis torquent ligula eu dui lorem nec accumsan platea lacinia ac. Non faucibus per sit in vehicula magna lacus deleniti. Tincidunt per aliquam. Vestibulum adipiscing laoreet eget eros commodo. Laoreet molestie a eros in nec sed justo venenatis. Eu lorem gravida. Nisl non a sociis convallis leo. Est nunc nisl porta dignissim turpis. Sapien sed nulla. Amet mi diam. Sem risus accumsan. Posuere viverra convallis. Est at netus. Tortor eget quam. Wisi nulla erat vestibulum tempor eu hendrerit vel dolor. Aliquam magnis sed etiam felis eros.</p>

                    <h2>Scelerisque in justo neque ultricies vel eget libero quam vitae metus ante nonummy amet augue</h2>

                    <p>Velit tellus enim. Vitae et ultrices. Odio torquent ligula. Quam in a scelerisque malesuada non. Sem enim congue sed odio libero. Lacinia commodo feugiat sed nonummy lobortis erat maecenas vivamus. Lectus diam pede. Eget risus mauris. In dapibus libero suspendisse pellentesque urna. Id metus libero. Metus id accumsan curabitur id congue. Elementum diam placerat posuere vivamus felis. Arcu ante vestibulum. Orci ut ut magna nibh eu aliquam mi qui vel pretium nullam. Tellus ligula malesuada. Consequat id nulla. Feugiat suscipit ligula dolor amet congue urna etiam amet accumsan consequat distinctio natoque placerat nec. Eget lectus mauris molestie fusce dui. Vel consectetuer imperdiet tempus at sed. Proin aliquam nec. Ligula sit elit eget faucibus cras arcu in rhoncus. Lorem id integer. Vestibulum nec cum. Ligula aliquam tellus elit nisl lectus in diam tortor wisi mauris tempus.</p><p>Fermentum ipsum augue. Lectus in nunc vulputate tellus neque tortor erat cursus. Congue wisi enim. Nam eget dui auctor amet quis donec ipsum nibh. Nisl leo magna officia leo nibh.</p>

                </li>
                <li class="right">
                    <ul id="summary1" class="summary">
                        <li class="caption">Summary 1</li>
                        <li class="contents">
                            <p>There are three floating summaries on the right of this page.  They are anchored to their respective sections.</p>

                            <p>Once a summary reaches the bottom of the header above, it will stop there until the next section summary arrives.  Then, it will continue up the page.</p>

                            <p>The last summary will get pushed up the page by the footer once it undocks to reveal the content below it.</p>
                        </li>
                    </ul>
                </li>
                <li class="left">
                    <h2>Mollis in ornare</h2>

                    <p>Nec a ut. Ut nullam urna. Quis tortor mauris blandit non corrupti. Rutrum in at id dignissim dictum. Duis ac ornare parturient ultrices amet odio feugiat aenean cras mus pede. Praesent egestas netus. Urna esse pharetra commodi commodo curabitur. A lacinia sed etiam ut vel maxime platea porta odio mollis non nisl nulla nullam. Vitae impedit pulvinar.</p>
{'fraction_non_alphanumeric': 0.1012882937715561, 'fraction_numerical': 0.011412051125989045, 'mean_word_length': 2.113374388125691, 'pattern_counts': {'":': 0, '<': 187, '<?xml version=': 0, '>': 188, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6378829', 'n_tokens_mistral': 6148, 'n_tokens_neox': 5639, 'n_words': 2126}