Posts From Category: bubble

How to create an icon button plugin for using Bootstrap and Font Awesome

When using Bubble I couldn’t find a decent icon button plugin so I made one using Font Awesome and Bootstrap. I thought others might find this useful so I created a quick video.

Shared - HTML Header

<link href="" rel="stylesheet">
<link href="" rel="stylesheet">

Elements - initialize() function

function(instance, context) {
	var btn = $('<button id="but" class="btn"></button>');
  function clickHandler(e) {
  btn.on('click', clickHandler);  

Elements - update() function

function(instance, properties, context) {
	var btn = $(instance.canvas.children()[0]);
  btn.addClass("btn-" + properties.type);
	btn.html('<i class="' + properties.icon + '"></i> &nbsp;' + properties.text);

Read More