Nervously Practice Multithreading

    focusable-element

    1.0.0 • Public • Published

    Focusable Build Status Awesome

    Gitter An awesome and lightweight library for performing spotlight in your DOM elements, setting an animated overlay to the rest of the page. You can find a live demo here.

    Showcase

    API

    Set spotlight (jQuery style)
    $('#my-element').setFocus(options);
    Set spotlight (through library)
    Focusable.setFocus($('#my-element'), options);
    Refresh current focused element
    Focusable.refresh();
    Hide spotlight
    Focusable.hide();
    Get focused element
    Focusable.getActiveElement();
    Get options
    Focusable.getOptions();
    Options
    Property Value Default Description
    fadeDuration Number 700 Duration of the overlay transition (milliseconds).
    hideOnClick Boolean false Hides the overlay when the user click into it.
    hideOnESC Boolean false Hides the overlay when the user press Esc.
    findOnResize Boolean false Refind the element in the DOM in case that the element don't still exists.
    circle Boolean false Have the spotlight in a circle shape
    Runing tests
    Dependencies
    • jQuery
    Contributing
    1. Check open issues
    2. Fork it
    3. Create your feature branch (git checkout -b my-new-feature)
    4. Commit your changes (git commit -am 'Add some feature')
    5. Push to the branch (git push origin my-new-feature)
    6. Create a new Pull Request
    Author

    You can follow me on Twitter - https://twitter.com/zzarcon

    Keywords

    none

    Install

    npm i focusable-element

    DownloadsWeekly Downloads

    301

    Version

    1.0.0

    License

    /* The MIT License (MIT) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */

    Last publish

    Collaborators

    • zzarcon