Skip to content

MATLAB/Octave library for stochastic optimization algorithms: Version 1.0.20

Notifications You must be signed in to change notification settings

LisaeClark/stochastic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poppy

Poppy is a popups provider. With poppy you can easily use any basic kind of popup or build your own popup as well. Demo.

Kinds of popups:

  • Overlay
  • Tooltip
  • Dropdown
  • Notifier
  • Popover
  • Modal

NPM

Getting started

Install

Grab the latest version or CDN. Insert script on the page:

<script src="cdn_url/poppy.js"></script>

Poppy is also available as a component for browserify, component or duo:

$ npm install poppy

var Dropdown = require('poppy/dropdown');
var Tooltip = require('poppy/tooltip');

Use

Create new instance:

var dropdown = new Dropdown({
	target: document.querySelector('#dropdown'),
	content: '<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>',
	contentType: 'html'
});

Options

Parameter Type Default Description
target selector, Element, NodeList, undefiend undefined A target or list of targets which by click show the popup container. Can vary depending on poppy type.
content string, Element, function undefined Content to show within the container. If function defined—it will be invoked and result considered as content.
contentType string element
'element'
Show other element in the container
'text'
Show content as plain text
'html'
Show content as inner html
containerClass string '' A class to add to the popup container
holder selector, Element <body> A holder of container
tip 'top', 'left', 'bottom', 'right', undefined false Show tip — a little triangle on the edge of the container.
tipAlign string, number 'center' Tip alignment relative to the container.
single bool false Hide other containers when this one becomes visible

API

Property/method Type Default Description
show(target) Make the container visible.
hide() Make container disappear.
enable() Make container active.
disable() Disable any interactions.
container Visible poppy container.
state Current state of poppy: closed, opened, opening, closing, disabled.

Events

| Name | Description | |----|----|----|----| | beforeShow | Called when container is going to show | | show | | | beforeHide | | | hide | | | enable | | | disable | |

License

MIT

About

MATLAB/Octave library for stochastic optimization algorithms: Version 1.0.20

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published