All Projects → libhide → Simplebox.js

libhide / Simplebox.js

Licence: mit
A simple, responsive lightbox plugin.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Simplebox.js

Cms
GleezCMS - A Light, Simple, Flexible Content Management System
Stars: ✭ 200 (+72.41%)
Mutual labels:  lightweight, jquery
Wondercms
WonderCMS - fast and small flat file CMS (5 files)
Stars: ✭ 330 (+184.48%)
Mutual labels:  lightweight, jquery
Uploader
A lightweight and very configurable jQuery plugin for file uploading using ajax(a sync); includes support for queues, progress tracking and drag and drop.
Stars: ✭ 1,042 (+798.28%)
Mutual labels:  lightweight, jquery
Pg Calendar
📆 beautiful and eidetic date picker
Stars: ✭ 109 (-6.03%)
Mutual labels:  jquery
Goalprogress
💯 Animated progress bar using jQuery to show how close you are to reaching your goal.
Stars: ✭ 109 (-6.03%)
Mutual labels:  jquery
Indicators
Activity Indicators for Modern C++
Stars: ✭ 1,838 (+1484.48%)
Mutual labels:  lightweight
Isonscreen
Simple jQuery plugin to determine if an element is within the viewport
Stars: ✭ 115 (-0.86%)
Mutual labels:  jquery
Jquery Udraggable
make elements draggable by mouse or touch
Stars: ✭ 107 (-7.76%)
Mutual labels:  jquery
Mobiscroll
Cross platform UI controls for progressive web and hybrid apps (plain JS, jQuery, Angular and React)
Stars: ✭ 1,510 (+1201.72%)
Mutual labels:  jquery
Clone Section Of Form Es6 Or Jquery
Now on npm. Using vanilla JavaScript (ES6) or jQuery to duplicate a section of a form, maintaining accessibility (a11y).
Stars: ✭ 112 (-3.45%)
Mutual labels:  jquery
Microproxy
Lightweight non-caching HTTP(S) proxy server
Stars: ✭ 112 (-3.45%)
Mutual labels:  lightweight
Jeesite4
Java EE 企业级快速开发平台,基于经典技术组合(Spring Boot、Spring MVC、Apache Shiro、MyBatis、Beetl、Bootstrap、AdminLTE),在线代码生成功能,包括核心模块如:组织机构、角色用户、菜单及按钮授权、数据权限、系统参数、内容管理、工作流等。采用松耦合设计;界面无刷新,一键换肤;众多账号安全设置,密码策略;在线定时任务配置;支持集群,支持SAAS;支持多数据源
Stars: ✭ 1,563 (+1247.41%)
Mutual labels:  jquery
Neat
🎈 Neat是一个追求极致优雅,高效,简洁,只为现代浏览器的,jQuery兼容的JavaScript库,只有3.7K(gzip)!
Stars: ✭ 114 (-1.72%)
Mutual labels:  jquery
Jquery Scrolllock
Locks mouse wheel scroll inside container, preventing it from propagating to parent element
Stars: ✭ 109 (-6.03%)
Mutual labels:  jquery
Alien
A lightweight and fast http router from outer space
Stars: ✭ 115 (-0.86%)
Mutual labels:  lightweight
Paging
js分页控件paging,jquery分页插件。
Stars: ✭ 108 (-6.9%)
Mutual labels:  jquery
Jquery Rwdimagemaps
Responsive Image Maps jQuery Plugin
Stars: ✭ 1,511 (+1202.59%)
Mutual labels:  jquery
Fileuploader
Beautiful and powerful HTML file uploading tool. A jQuery, PHP and Node.js plugin that transforms the standard input into a revolutionary and fancy field on your page.
Stars: ✭ 111 (-4.31%)
Mutual labels:  jquery
Bootstrap Validate
A simple Form Validation Library for Bootstrap 3 and Bootstrap 4 not depending on jQuery.
Stars: ✭ 112 (-3.45%)
Mutual labels:  jquery
Nukeviet
NukeViet CMS is multi Content Management System. NukeViet CMS is the 1st open source content management system in Vietnam. NukeViet was awarded the Vietnam Talent 2011, the Ministry of Education and Training Vietnam officially encouraged to use.
Stars: ✭ 113 (-2.59%)
Mutual labels:  jquery

simplebox.js

simplebox.js is a lightweight lightbox plugin (~936 bytes) that is easy to modify or extend to fit your needs. This plugin is intended to be a quick, responsive, efficient.

The idea behind this plugin was to make the process of setting up a lightbox painless. My experience with finding and setting up lightbox plugins has been pretty bad. The plugins I've come across almost always have too many features. simplebox.js is designed to have just one feature: lightboxing. It's responsive out of the box and allows only a few crucial settings.

Installation

To install simplebox, you will have to include the following resources in your page. The JS files should be loaded in the order stipulated below. For the CSS file, you can either incorporate it with your site's stylesheet, or load it externally through the <link> element in <head>.

Type File Name Description
JS jQuery jQuery is obviously needed
JS dist/js/simplebox.min.js Confers the main functionality of the plugin.
CSS dist/css/simplebox.min.css Offers styles that are crucial for the correct display of simplebox. The appearance will break if this is not included. Properties in this file include the necessary vendor prefixes.

Usage

Basic

It is rather straightforward to use simplebox—just add the slb class to all the images you want this plugin to work for and then simply chain the .simplebox() method to $(".slb") in your JavaScript.

<img class="slb" src="/path/to/image" alt="lorem ipsum" />
$(function () {
    $(".slb").simplebox();
});

Advanced

The plugin comes with four options. Yes, just four. Think of this as a feature and not a drawback! If you want to access these options, call the plugin like this:

$('.slb').simplebox({
    fadeSpeed: 300, // default is 400ms, applied to all fade animations in the plugin
    darkMode: true, // default is false
    postfix: "_full", // default is ""
    hqClass: "highres" // default is "hq"
});

You can use postfix and hqClass options to customize the path to the image used in the pop-up. For every image defined as <img src="[initial path].[extension]" class="slb [hqClass]" alt="[alt]"> simplebox will use <img src="[initial path][postfix].[extension]" class="slb" alt="[alt]">. Notice that you shouldn't use hqClass with images that don't have a version with the postfix.

Also, simplebox keeps the values of srcset and alt attributes in the pop-up image as well so you can do some cool things with srcset if you need to as well!


If you are using this plugin and want your product to be listed here, hit me up on @Ratik96 on Twitter!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].