npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fallr-js

v2.0.1

Published

Fancy, simple, yet elegant modal box jQuery plugin

Downloads

10

Readme

Fallr.js

fallr-img

Fancy, simple, yet elegant modal box jQuery plugin

  • Author : Faisal Salman <[email protected]>
  • 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

| method | description | example | | --- | --- | --- | | show | Create and show message box | $.fallr.show({content: 'hello world!'}, function(){ console.log('message box appears'); }); | | hide | Hide current active message box | $.fallr.hide(function(){ console.log('message box disappears'); }); | | resize | Resize width/height of current active message box | $.fallr.resize({width: '500px', height: '400px'}); | | set | Set default options that will be used for every message box instance in the page | $.fallr.set({duration: 1000, useOverlay: true}); | | blink | Make the current active message box blinking | $.fallr.blink(); | | shake | Make the current active message box shaking | $.fallr.shake(); |

Options

| option | type | default | description | | --- | --- | --- | --- | | buttons | object | { button1 : { text : 'OK', danger : false, onclick : function () { $.fallr.hide(); }}} | Buttons | | icon | string | "check" | Icon | | content | string | "Hello" | Message box content | | position | string | "top" | Message box position, top/center/bottom | | closeKey | bool | true | Closable by ESC key | | closeOverlay | bool | false | Closable by overlay click | | useOverlay | bool | true | Show overlay outside message box | | autoclose | bool | false | Duration until message box close in miliseconds, false to disable | | easingDuration | int | 300 | Duration for animation | | easingIn | string | "swing" | Type of easing when appear | | easingOut | string | "swing" | Type of easing when disappear | | height | string | "auto" | CSS value for exact height | | width | string | "360px" | CSS value for exact width | | zIndex | int | 100 | Set z-index for message box | | bound | string/object | window | jQuery selector for custom boundary | | afterHide | function | function () {} | after hide callback | | afterShow | function | function () {} | 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 <[email protected]>

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.