Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fallr-js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fallr-js

Fancy, simple, yet elegant modal box jQuery plugin

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Fallr.js

fallr-img

Fancy, simple, yet elegant modal box jQuery plugin

  • Author : Faisal Salman <f@faisalman.com>
  • Demo : https://faisalman.github.io/fallr-js
  • Source : https://github.com/faisalman/fallr-js

Usage

<!-- include the required CSS -->
<link rel="stylesheet" type="text/css" href="jquery-fallr-2.0.1.css" />
                
<!-- include any version of jQuery before including plugin -->
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>

<!-- include the plugin -->
<script type="text/javascript" src="jquery-fallr-2.0.1.min.js"></script>

API

General

$.fallr.[method]([,options:Object] [,callback:function]);

Methods

methoddescriptionexample
showCreate and show message box$.fallr.show({content: 'hello world!'}, function(){ console.log('message box appears'); });
hideHide current active message box$.fallr.hide(function(){ console.log('message box disappears'); });
resizeResize width/height of current active message box$.fallr.resize({width: '500px', height: '400px'});
setSet default options that will be used for every message box instance in the page$.fallr.set({duration: 1000, useOverlay: true});
blinkMake the current active message box blinking$.fallr.blink();
shakeMake the current active message box shaking$.fallr.shake();

Options

optiontypedefaultdescription
buttonsobject{ button1 : { text : 'OK', danger : false, onclick : function () { $.fallr.hide(); }}}Buttons
iconstring"check"Icon
contentstring"Hello"Message box content
positionstring"top"Message box position, top/center/bottom
closeKeybooltrueClosable by ESC key
closeOverlayboolfalseClosable by overlay click
useOverlaybooltrueShow overlay outside message box
autocloseboolfalseDuration until message box close in miliseconds, false to disable
easingDurationint300Duration for animation
easingInstring"swing"Type of easing when appear
easingOutstring"swing"Type of easing when disappear
heightstring"auto"CSS value for exact height
widthstring"360px"CSS value for exact width
zIndexint100Set z-index for message box
boundstring/objectwindowjQuery selector for custom boundary
afterHidefunctionfunction () {}after hide callback
afterShowfunctionfunction () {}after show callback

Custom Icon

There are some predefined icons name you can use already: at, bars, book, calendar, photo, chart, chat, check, clock, gear, document, error, folder, heart, help, home, info, key, lamp, left, magnifier, mail, minus, pen, pin, plus, quote, reload, right, star, tag, trash, unlock, up, user, window, config.

To define another custom icon class name you have to edit the CSS file, then add a CSS class with .ficon- prefix like this:

.ficon-twitter {
    background-image: url('img/twitter.png');
}

The image format must be a PNG/GIF/JPG with recommended size 32x32 px. In the example above we can see that the twitter icon file is inside /img folder relative to the CSS file, then you can use it as:

$.fallr.show({icon : 'twitter', content: '<p>Hi there, see my new icon!</p>'});

Credits

  • CSS3 Github buttons by Nicolas Gallagher
  • Iconic icon set by somerandomdude

License

Dual licensed under GPLv2 or MIT

Copyright © 2011-2014 Faisal Salman <f@faisalman.com>

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.

Keywords

FAQs

Package last updated on 22 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc