jQuery PopBox UI Element

Overview

jQuery PopBox

jQuery PopBox is a simple balloon UI element inspired by 37Signals Highrise CRM.

See it in action here: http://gristmill.github.com/jquery-popbox/example.html

Usage

jQuery PopBox requires a specific HTML structure in order to work. There is also a small stylesheet that can be used. jQuery is a dependency.

<head>
  <script type='text/javascript' charset='utf-8' src='jquery.js'></script>
  <script type='text/javascript' charset='utf-8' src='popbox.js'></script>
  <link rel='stylesheet' href='popbox.css' type='text/css'>
</head>

The HTML structure looks like this.

<div class='popbox'>
  <a class='open' href='#'>Click Here!</a>

  <div class='collapse'>
    <div class='box'>
      <div class='arrow'></div>
      <div class='arrow-border'></div>

      Content in PopBox goes here :)

      <a href="#" class="close">close</a>
    </div>
  </div>
</div>

Invoke the plugin by calling it on a selector like normal.

<script type='text/javascript'>
   $(document).ready(function(){
     $('.popbox').popbox();
   });
</script>

If there are any CSS class name conflicts, they can be overridden.

<script type='text/javascript'>
   $(document).ready(function(){
     $('.popbox').popbox({
       'open'          : '.open',
       'box'           : '.box',
       'arrow'         : '.arrow',
       'arrow_border'  : '.arrow_border',
       'close'         : '.close'
      });
   });
</script>

Screenshot

jQuery PopBox Screenshot

Credits

jQuery PopBox developed by Sean Behan at Gristmill.io

It is inspired by the balloon UI element found in 37Signals Highrise CRM.

License

MIT license:

http://www.opensource.org/licenses/MIT

Comments
  • Prevent event propagation on close

    Prevent event propagation on close

    Handy script, thanks a lot for making this. I put this in use on a site today, but had one issue. When the close method was triggered by clicking on the close selector, the click event on the close selector was propagated, resulting in the page scrolling to the top.

    I modified the script to pass the click event to the close method so that the event propagation could be stopped. I did not minify the modified script as I was unsure what you were using for minification. If you accept this patch, the script will need to be minified.

    opened by knicklabs 4
  • Not working with jquery version 3.4.* . Only working with version 1.7.1.

    Not working with jquery version 3.4.* . Only working with version 1.7.1.

    Hi, My website is fully developed with a newer version of jquery(3.4.1) but this pop box is not working with this version. When I clicked a button, the popbox opens and closes instantly. But with jquery version 1.7.1, it is working perfectly.

    Will it not work with the newer version of Jquery?

    opened by Manaspaul623 0
  • Keep open when datepicker inside

    Keep open when datepicker inside

    I have a bootstrap datepicker inside a popbox, but every time you click on a date it closes the popbox as well. Do you know how I can stop this happening??

    opened by dpDesignz 0
  • Resolved conflict with Twitter Bootstrap and made general code polishing

    Resolved conflict with Twitter Bootstrap and made general code polishing

    What's done:

    • .collapse class removed
    • Moved the .open rule from CSS to index, where it is used.
    • Linked CDN jQuery in index
    • Fixed some CSS problems and reformatted sources

    @gristmill: Note: the Twitter link is broken

    opened by tivnet 0
  • How to make the popbox the highest z-index

    How to make the popbox the highest z-index

    Hi. I have several "open" links in a same page (they all are images), each opens one popbox.

    My problem is that when I click to open a popbox, if the popbox overlays with one of the other "open" links, the popbox is not the highest z-index so, the other links are not hidden by the popbox but they still show, as if they were in the middle of the content of the box.

    How could I fix this ?

    Thanks pop

    opened by clochette 3
Avgrund is jQuery plugin with new modal concept for popups

Avgrund Avgrund is a jQuery plugin for your modal boxes and popups. It uses new concept showing depth between popup and page. It works in all modern b

Dmitri Voronianski 1.8k Dec 14, 2022
A light-weight, customizable lightbox plugin for jQuery

About Colorbox: A customizable lightbox plugin for jQuery. See the project page for documentation and a demonstration, and the FAQ for solutions and e

Jack Moore 4.8k Dec 29, 2022
jQuery lightbox script for displaying images, videos and more. Touch enabled, responsive and fully customizable.

fancyBox jQuery lightbox script for displaying images, videos and more. Touch enabled, responsive and fully customizable. See the project page for doc

Jānis Skarnelis 7.2k Jan 2, 2023
A touchable jQuery lightbox

Swipebox A touchable jQuery lightbox. View project page What is Swipebox ? Swipebox is a jQuery "lightbox" plugin for desktop, mobile and tablet. Feat

null 2k Dec 6, 2022
jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.

jBox jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more. Demo: https://stephanwagner.

Stephan Wagner 1.4k Dec 15, 2022
Elegant, responsive, flexible and lightweight modal plugin with jQuery.

iziModal Elegant, responsive, flexible and lightweight modal plugin with jQuery. izimodal.marcelodolza.com Fast Responsive Animated Lightweight Custom

Marcelo Dolza 2.1k Dec 30, 2022
The simplest possible modal for jQuery

A simple & lightweight method of displaying modal windows with jQuery. For quick examples and demos, head to jquerymodal.com. Why another modal plugin

Kyle Fox 2.5k Dec 29, 2022
A Lightweight Responsive jQuery Tooltip Plugin

tipso A Lightweight Responsive jQuery Tooltip Plugin There is also a Wordpress version of this plugin. Get it here Getting started Include jQuery <scr

Bojan Petkovski 325 Dec 21, 2022
null 3.9k Dec 30, 2022
基于vue3.0-ts-Element集成的简洁/实用后台模板!《带预览地址》vue-admin;vue+admin;vue-element;vue+element;vue后台管理;vue3.0-admin;vue3.0-element。

一、基于vue3.0+ts+Element通用后台admin模板 二、在线预览地址:http://admin.yknba.cn/ 三、下载使用: 1、克隆代码 通过git将代码克隆到本地;或者使用下载安装包模式进行下载。 2、进入目录 进入项目的根目录:vue3.0-ts-admin 3、安装依

null 64 Dec 16, 2022
🎉 基于 vite 2.0 + vue 3.0 + vue-router 4.0 + vuex 4.0 + element-plus 的后台管理系统vue3-element-admin

vue3-element-admin ?? 基于 Vite 2.0 + Vue3.0 + Vue-Router 4.0 + Vuex 4.0 + element-plus 的后台管理系统 简介 vue3-element-admin 是一个后台前端解决方案,它基于 vue3 和 element-plu

雪月欧巴 84 Nov 28, 2022
JavaScript micro-library: pass in an element and a callback and this will trigger when you click anywhere other than the element

Add a click listener to fire a callback for everywhere on the window except your chosen element. Installation run npm install @lukeboyle/when-clicked-

Boyleing Point 5 May 13, 2021
jQuery Timer: Start/Stop/Resume/Remove pretty timer inside any HTML element.

jQuery Timer plugin Lightweight, well tested jQuery pretty timer plugin Start, Pause, Resume and Remove a timer inside any HTML element. Get notified

Walmik Deshpande 291 Nov 4, 2022
Slide-element - A ~700 byte Promise-based library for animating elements with dynamic heights open & closed. Basically, a modern variant of jQuery's slideUp(), slideDown(), and slideToggle().

slide-element A tiny, accessible, Promise-based, jQuery-reminiscent library for sliding elements with dynamic heights open & closed. To see it in acti

Alex MacArthur 165 Dec 12, 2022
A simple jQuery extension to make any HTML element sticky on scroll.

jquery.sticky.js A simple jQuery extension to make any HTML element sticky on scroll. Installation Just download the script and include it in your HTM

Achal Jain 2 Aug 22, 2022
A jQuery plug-in to notify you of CSS, Attribute or Property changes in an element

selectWatch.js jQuery plug-in gives an opportunity to monitor changes of DOM element's CSS styles, attributes, properties, input element or select ele

Fatih Kazancı 3 Oct 28, 2022
A simple lightweight file dropzone component based on jQuery. You can easily make any existing element become a dropzone that holds files.

file-dropzone A simple lightweight file dropzone component based on jQuery. You can easily make any existing element become a dropzone that holds file

Anton Bardov 1 May 31, 2021
A jQuery plugin allowing you to scroll an image within a container element

jQuery Scroll Image Inside v0.1 A jQuery plugin allowing you to scroll an image within a container element Usage <div id="window"> <img src="reall

Derek Ashauer 1 Apr 11, 2021
Easy to use, Element Printing Plugin for jQuery

jQuery Print Plugin jQuery.print is a plugin for printing specific parts of a page Usage Include it in your HTML after importing jQuery, like: <scrip

Doers' Guild 817 Nov 25, 2022
Creates a table of contents in a DOM element optionally linked to with anchors. No jQuery or other dependencies.

HTML-Contents Creates a table of contents in a DOM element optionally linked to with anchors. No dependencies. @psalmody Get It We're on npm: npm i ht

Michael Tallino 3 Oct 25, 2022