popupwin

Created: 2012-03-24 19:44
Updated: 2014-03-14 11:01

README.md

Popupwin v.3

jQuery plugin to realization pop-ups windows. Плагин для реализации всплывающих окон.

  #id-popup {
    display: none;
    ...

Quickstart

  <a href="#id-popup" id="link">Link</a>
  <div id="id-popup">
    Content...
  </div>
  $('#link').popupwin();

or:

  <a href="#" id="link">Link</a>
  <div id="id-popup">
    Content...
  </div>
  $('#link').popupwin({
    pwinBlock: '#id-popup'
  });

Callbacks

  <a href="#id-popup" id="link">Link</a>
  <div id="id-popup">
    Content...
  </div>
  $('#link').popupwin({
    callbackOpen: function(popup, link){
      alert('open');
    },
    callbackClose: function(popup, link){
      alert('close');
    }
  });

and...

  <a href="#id-popup" id="link">Link</a>
  <div id="id-popup">
    Content...
  </div>
  $('#id-popup').popupwin('open', {
    pwinBack: '#ff0000'
  });
  $('#id-popup').popupwin('center');

Open a window when the page loads.

All settings

  • pwinBlock (string/object or false). By default: false. See example.
  • pwinClose (string). Selector element within pwinBlock. By default: '.close'
  • pwinBack (string). Background color. By default: '#000'.
  • pwinOpacity (float). Opacity background. By default: 0.3.
  • pwinSpeed (integer). Animation speed. By default: 400.
  • fixed (boolean). CSS position By default: false.
  • resize (boolean). Change of popup position during resizing the window By default: true.
  • callbackOpen (callback).
  • callbackClose (callback).
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more