FixMan

πŸ“Œ

Build Status All Download Release License

Index

1. Getting Started

1-1. How to load?

1-2. Simple Example

For convenience, 1-1 code, which loads and creates a Library in the example, is omitted.

Example - fix top

  1. Set data-fixed to target element

    <div data-fixed>Hello</div>
    
  2. Run detect() then, When Page is Loaded, detect and apply elements with a data-fixed attribute

    fixman.detect();
    
  3. πŸ‘¨β€πŸ’»
    <style> .test1 { display:block; height:50px; border:2px solid black; margin-bottom:200px; } </style> <script> fixman.detect(); </script> <body> <div class="test1">Please scroll down.</div> <div class="test1" style="width:500px; background:#FFFFFF;" data-fixed> <span style="font-size:30px">μ•ˆλ…•?</span> <input type="text" value="Some Text"> <button onclick="alert('Testing');">πŸ”Ž</button> <button onclick="window.scrollTo({top:0, behavior:'smooth'});">πŸ”</button> </div> <div class="test1" style="width:250px; background:pink;">Hello?</div> <div class="test1" style="width:200px; background:skyblue;">Annyeong?</div> <div class="test1" style="width:300px; background:gold;">Konnichiwa? and Nihao? or Hola?</div> </body>

Example - fix multiple