Giter Site home page Giter Site logo

brayancruces / simple-overlay Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tommcfarlin/simple-overlay

0.0 1.0 0.0 264 KB

[Retired-jQuery] A Plugin For Lightweight, Flexible, and Customizable Overlays. This plugin is no longer maintained.

Home Page: http://tommcfarlin.com/simple-overlay

License: MIT License

simple-overlay's Introduction

============================================================================
jQuery Simple Overlay
Tom McFarlin, http://tommcfarlin.com, @moretom
============================================================================

ABOUT

Simple Overlay is a jQuery plugin for easily including full screen overlays
in your projects. 

It features a variety of configuration options for incorporating multiple
overlays, custom styles, glossy effect, callbacks, and more.

You can apply styles to the element that triggers the overlay using the
'overlay-trigger' class name. The overlay itself given a class name of
'overlay.'

-------------------------------------------

PARAMETERS

color         string
Specifies the hexidecimal or literal value for the color of the overlay.
Defaults to black.

opacity       number
The level of transparency for the overlay. Ranges from 0 to 1.0.
Defaults to 0.5.

effect        string
Dictates how the overlay is displayed and hidden. Can be either none,
fade, or slide.
Defaults to none.

onShow        function
The function called once the overlay is displayed.
Defaults to null.

onHide        function
The function called once the overlay is hidden.
Defaults to null.

closeOnClick  boolean
Dictates whether or not the overlay is closed when it's clicked.
Defaults to false.

glossy        boolean
Specifies whether or not a glossy effect is applied to the overy.
Defaults to false

container     string
The element to which the overlay is applied. Should be an ID.
Defaults to body.

-------------------------------------------

EXAMPLES

Display a semi-transparent red overlay when the first anchor on the
page has been clicked. Display an alert dialog and close the overlay
when it has been clicked.

  $('a:first').overlay(function(evt) {
    $(this).overlay({
      color: 'red',
      closeOnClick: true,
      onShow: function() {
        alert('Hello world!');
      }
    });
  });

Fade a semi-transparent black, glossy overlay into view once the element
having the ID of #trigger has been clicked.

  $('#trigger').click(function() {
    $(this).overlay({
      effect: 'fade',
      glossy: true
    });
  });

Append a new element to the DOM once the default overlay has been
displayed:

  $('#trigger').click(function() {
    $(this).overlay({
      onShow: function() {
        $('body').append(
          $('<div id="new-element">This is my new element!</div>');
        );
      });
    });
  });

-------------------------------------------

CONTACT

Web:      http://tommcfarlin.com
Twitter:  @moretom
Email:    [email protected]

============================================================================

MIT license:
http://www.opensource.org/licenses/mit-license.php

simple-overlay's People

Contributors

tommcfarlin avatar oxigenka avatar 66ton99 avatar

Watchers

Brayan Cruces avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.