At GRAYBOX, we are frequently building websites that require a modal popup to display and focus visitors on some content. With so many existing tools, plugins, and libraries, it has become a difficult task to select one that suits a client’s needs.

So how do we choose among the options out there? First, it is important to define exactly what the modal will be doing. Will it just show some simple HTML (text, image, or video)? Will it require user input? Is the content of the popup going to be loaded using AJAX?

Normally there would be a different type of modal for each of these purposes. Luckily, the answer to all of these questions can now be answered with a single lightweight jQuery plugin. The name: bPopup.js.

The best thing about this popup is that, as its author sums up, it doesn’t create or style the popup for you, but provides you with all the logic like centering, modal overlay, events, and more. When it comes to adaptability, bPopup is the best option because it gives you all the freedom to create the style that matches with the website structure. Also, since the plugin handles all the JavaScript logic, bPopup is simple to incorporate into any website. With just a few lines of code, we are ready to display any kind of content.

Modal Popup

These are some of the features that bPopup provides:

  • Events (open, close, callbacks)
  • Following the user’s scrolling on the page
  • Auto-centering on the screen
  • Custom close button
  • Content loaded via:
  • Previously defined content container
  • Ajax
  • Iframe
  • Multiple popups at the same time
  • And, of course, options to configure these actions

Because bPopup only gives you the tools to setup the modal, you have the freedom to create custom functionalities within the popup, allowing you to basically do anything you can imagine. Another bonus is that it’s compatible on all major browsers including: Internet Explorer 7+, Firefox 2+, Chrome 4+, and others.

While bPopup isn’t a one size fits all solution, it’s certainly one of the most flexible options of its kind around.

Paul Weinert
Author

Paul Weinert is our founder, managing principal and spirit animal. He’s one of those odd people you meet that was born in Portland, grew up here and still lives here for some reason. If you had two words to describe Paul after meeting him, we’d bet you’d use “charmingly quirky”.

Paul started GRAYBOX in February 2009, and for the first four years, GRAYBOX had a blend of a contract staffing firm and a traditional agency. GRAYBOX then hired our first employees in 2012 and has been growing ever since. Professionally, Paul has a background in internet business consulting, working especially with mid-market ecommerce, healthcare, and tech companies. He worked as a user experience designer, web developer and internet marketer. Nowadays, Paul serves as our company visionary, team mentor and head of executive leadership — Paul is extremely proud of the entire team and the company. He’s constantly humbled by the team’s awesomeness and the caring community that’s sprung up from his initial ideas.

Beyond GRAYBOX, Paul is married, has two young boys and lives in NE Portland. He’s also an active foster parent, mentors other local entrepreneurs, and volunteers on local non-profit boards. Businesswise, aside from GRAYBOX, Paul has started a few other businesses and is an active investor in the local startup scene.

For the sheer joy of it, let’s play 2 truths and a lie:

  1. Paul firmly believes that any activity would be better if on a boat.
  2. Other than this whole Internet thing, Paul has basically no other skills or expertise in anything.
  3. Paul is rare unicorn, actually born and raised in Portland.