Scroll to Top

Fixed Div

use this plugin to instantly fix your div or any element, this plugin is expandable.

SITEMAP Documentation / Js Plugins / Fixed Div

Demo

Activate this plugin

this div is fixed.

close

Code copy

<a class="btn btn-warning s" id="clicktoopenfixed">Activate this plugin</a>
    <div class="pad-20 red6 thisisfixed border-dark">
        <p class="text-white">this div is fixed.</p>
        <a class="btn btn-dark" id="closeFixedDiv">close</a>
    </div>
<script>
        $(document).ready(function(){
            $(".thisisfixed").hide();
            $("#closeFixedDiv").click(function(){
                $(".thisisfixed").hide();
            });
            $(".thisisfixed").fixedDiv();
            $("#clicktoopenfixed").click(function(){
                $(".thisisfixed").show();
            });
        });
    </script>

Expandable, options

Demo

variable default data-type options function
positiOnX right string left, right horizontal position
positiOnY bottom string top, bottom vertical position
DivMarginX 30px string any measurement margin from left and right
DivMarginY 80px string any measurement margin from top and bottom

Code copy

<script> 
    $(".thisisfixed").fixedDiv({positiOnX: 'left'});
</script>

Feedback