Results tagged “fork”

I have been doing a lot of work in jQuery as of late and stumbled across the popular jQuery plugin called "Thickbox" which works similarly to Lightbox, but is more fully featured.

ThickBox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal.

There were a couple of problems with the plugin though when I started using it. For one, the plugin has not been updated in a long time and was not compatible with the latest version of jQuery: 1.3.1. It also used a rather non-standard way of configuration and was completely non-extensible. In fact, it required users to edit CSS and Javascript files in order to point the library at the right images to use. That's no good at all because it makes it possible for a simple upgrade to break a site, granted in a minor way, but still.

No doubt the original author of the plugin has a million other things on his plate, so I thought I would chip in, upgrade the plugin, and contribute them back to the author and community, and if necessary take over maintenance of the plugin.

Download

Documentation

Installation Instructions

  1. Upload the thickbox files to your web server.

  2. In your web page using thickbox, import the javascript like so:

    <script type="text/javascript" src="jquery.thickbox-byrne.js"></script>
    
  3. In your web page, import the CSS like so:

    <link rel="stylesheet" href="thickbox.css" type="text/css" />
    
  4. Read the rest of this documentation and initialize thickbox according to your needs.

Options/Settings

The following options can be used when initializing Thickbox.

  • macFFBgHack - default: '../images/macFFBgHack.png'. A path to the image "macFFBgHack.png" on your web server.

  • loadingImage - default: '../images/thickbox-loading.gif'. A path to the image "thickbox-loading.gif" on your web server.

  • modal - boolean (true|false), default: false. Determines whether or not the dialog that appears is modal or not.

  • iframe - boolean (true|false), default: false. Determines whether or not the dialog will be iframed content.

  • inlineId - string, default: ''. Sets the DOM id that contains the content that will be displayed in the thickbox.

  • width - default: 600. Sets the size (width obviously) of the thickbox.

  • height - default: 400. Sets the size (height obviously) of the thickbox.

Usage

    $('a.thickbox').thickbox({
            macFFBgHack: 'images/macFFBgHack.png',
            loadingImage: 'images/thickbox-loading.gif'
    });

Demo

It worked!

Click me

Changes between 1.3 and 1.3-byrne

The version described here is '1.3-byrne' which is a fork of the original Thickbox plugin versioned 1.3. Here is a list of the changes I have made in my fork:

  • thickboxes can be instantiated on any element ID now. It is no longer hard-coded to $("a.thickbox").
  • thickboxes are now configured using a more standard settings/options array.
  • The plugin itself now utilizes more a more up-to-date coding standard for jQuery plugins.
  • The plugin is now compatible with jQuery 1.3 and greater.
I am constantly surprised at the quality of suggestion coming from the Pandora service. However, the selection is often too reliable and linear, in that Pandora doesn't give me enough ways to explore music I am unfamiliar with, but enjoy listening to. What I want is a way to tweak my musical trajectory a bit while I am listening. Consider the possibilities if one could visualize the music that will be played next so I could bias the next selection towards specific genetic qualities. Make sense? For example, what if instead of the player displaying simply what I have and what I am listening to... what if it could also display what will be played next? And if that is possible, then what if Pandora displayed more than one item that could be displayed next, and it gave the user the option to select which they would like to hear? Naturally, if the user doesn't select one specifically, then Pandora will continue playing songs exactly as it does today. And if that is possible, what if instead of giving the user to option to select what song that could come next, but you gave them options like, "make the next song similar, but with: a) a faster tempo, b) stronger vocal track, c) etc." A system like this could allow users to explore other genres more easily, and make "course corrections" while they were listening.
1


Recent Comments

  • I normally surf all over the web because I have the tendancy to read often (which isn't always a great idea because most blogs just copy from each other) but I have to say that yours contains some real substance! Thanks ...

Close