You can make your Hello Bar open its link in a modal box with just a few extra lines of code. This allows you to convert your Hello Bar clicks directly into action. You might want to do this for an email sign up, Facebook Like, Twitter Follower, Wufoo contact form…etc. You might even notice that the Hello Bar homepage is set up this way (at the time of this writing). There are two main steps to achieving this effect, but before you read on, check out the Demo pictured above and the use cases below.
Here are a few specific use cases:
Wufoo Form integration
Mailchimp Form integration
Facebook Like / Twitter Follow Integration
Step 1: Give Your Hello Bar a #hash as it’s Link URL.
Typically, when a hyperlink needs to perform an action instead of taking you somewhere, we web developers use a hash at the end of the URL both for identification and convention purposes. In this case, my demo Hello Bar goes to #open-sesame as it’ll be opening a modal.

Step 2: Tell Fancybox to Open Something Specific.
There’s no non-code way to do this yet, but for now you’ll need to load Fancybox on your page (There’s a WordPress plugin available too). Once you’ve loaded Fancybox, you then need to tell it what you’d like to pop-open when someone clicks the link in your Hello Bar. Head on over to the demo and view the source code to see the specifics. It should be pretty self explanatory and if you know your way around jQuery then you can use any selector to target your Hello Bar link. I used a selector that specifically looks for links ending in #open-sesame.
Here’s a sample of the code used:
$('#hellobar-wrapper [href$="#open-sesame"]').fancybox({
type: 'iframe',
href: 'http://www.wikipedia.org/',
width: 800,
height: 600
});
Let me know if you found this little tip useful and if this is something you’d like to see integrated into Hello Bar as a feature in the future. Just leave a comment with your thoughts.
Update:
I’ve updated the code examples in the demo files and the .zip archive for better IE7/8 compatibility.
Related posts:





Comments 16
Yes yes very much so! I use Mailchimp and the newsletter sign up form modal box looks great =)
Yes! I totally want to see this as a feature in the Hello Bar.
Having trouble integrating an aweber pop-up form with hello bar. Would definitely like it integrated, and if you can reply / add some more detailed instructions that would be great. I’ve already spent hours trying to get the aweber pop up to work.
Hi David,
If you give us a bit more info about the specifics of the issue you’re experiencing we’ll be happy to help. Post it in Our Support Forum as it’s a much better spot for tech support and replies, etc.
Where did I add the code? Does it need to be added to the post/page template?
Yes Geoff,
Ideally it would be in your theme template, but it’s up to you. Keep in mind that you can break certain things on your blog if you incorrectly edit these files.
ooh, can’t get this to work quite. do i need a newer version of jQuery? i’m on WP with an Organic Theme.
Hi Rena,
Post your site URL here: http://getsatisfaction.com/hellobar and let us know what your process was. We’ll do our best to get you up and running.
Jamie,
I am still having trouble getting this modal popup to work. I have installed Fancybox and configured the HelloBar as described. I still not quite clear on where to place the code. I am running WordPress within a Joomla installation, so WordPress has inherited the Joomla theme. I tried adding the code to the Joomla theme, as well as the WordPress theme and single post files. No luck. Any direction you can share would be most appreciated.
Jamie,
What code, if any, do I need to include in the Fancybox setup?
Thats not a very good tutorial.
You could easily create a step by step tutorial for these so your readers wouldn’t have to try again in the forum
Your just being very arrogant and lazy
I have to agree, this is a very poorly written tutorial. I spent quite a few hours trying to figure out how to implement this on my site and still couldn’t get it to work.
Wasted time to the point I wish I had never clicked the link.
Please take the time to create a good, step-by-step tutorial if you’re going to introduce cool features like this. I think everyone agrees that this is an essential feature, so please consider updating this post.
Hi Jeff,
I’m really sorry to hear that you didn’t like the tutorial. While it’s a tad advanced and we really intended it to be an overview/point in the right direction, in the future I’ll make sure to add more steps/clarity when writing posts with code heavy tutorials.
Which sections in particular are giving you grief?
Hi Jamie,
Given the general consensus that we need a better tutorial, perhaps you might consider actually showing a step by step with images that would make it easier to integrate both Hellobar and Fancybox for WordPress.
Maybe find an existing subscriber and have them tell you at each step they need to know in order to get the tutorial done. Maybe even offer an upgrade subscription as a reward.
Hi Jamie,
Is there a way I can integrate constant constant?
Hi Mina,
Whatever is on the page (iFrame) that the modal opens will show up. So if you can place your constant contact form (or whatever else) on that page then it should indeed work.
Leave a Comment