Eavify (jQuery Plugin)

The Eavify jQuery plugin automatically converts Empire Avenue‘s (e)TICKER notation into a link to the EA profile. Optionally, it can also display the EA badge for that ticker in a tooltip. As a jQuery plugin, Eavify can be used on any web page and only requires jQuery to be included (though the badge tooltip also requires the qTip jQuery plugin).

Here is an example:

(e)OL

Installation

Note: If you are using WordPress, you may want to check the Empire Avenue Tools plugin which automatically uses Eavify as of version 0.3.

The Easiest Way

If jQuery is not already included on your web page, you can simply insert the following three lines within the <head> tag. It will import jQuery, qTip and Eavify from olussier.net.

<script src="http://olussier.net/apps/eavify/jquery.min.js" type="text/javascript"></script>
<script src="http://olussier.net/apps/eavify/jquery.qtip.min.js" type="text/javascript"></script>
<script src="http://olussier.net/apps/eavify/jquery.eavify.min.js" type="text/javascript"></script>

The Better Way

For better performances, it is better to host the files on your own server. Here are a few options to download Eavify:

Customization

By default, Eavify converts all the tickers in the page (within the <body> tag) and shows the badge tooltip (if qTip is loaded). You can change this behavior by using the jQuery.Eavify.init method and passing it a function to run on load. Within this function, you can use jQuery selectors to choose where the tickers should be converted. Call the eavify method to do the conversion. Here’s an example:

jQuery.Eavify.init(function() {
  jQuery('#MyContent').eavify({ badge: true; });
  jQuery('#MySidebar').eavify({ badge: false; });
});

The above code would override the default behavior and make Eavify convert only the tickers within the elements with id “MyContent” and “MySidebar”. Also, the tickers within “MySidebar” would not display the badge tooltip.

eavify Method Options

badge: (true or false) Whether to display the badge tooltip or not. If qTip is not loaded, the tooltip is never displayed.

linkClass: (class name) The CSS class name to apply to the ticker links. By default, the class name is EATicker and the default styling is applied only to this class.

tooltipClass: (class name) The CSS class name to apply to the iframe within the badge tooltip. By default, the class name is EATickerTooltip and the default styling is applied only to this class.

badgePath: (path) The path to the “showbadge.php” file. By default, this is “http://olussier.net/apps/eavify/showbadge.php” but you may want to change this to a copy on your server for better performances. The file is available in the full package above.

Posted at August 4th, 2010.
  • http://topsy.com/olussier.net/eavify/?utm_source=pingback&utm_campaign=L2 Tweets that mention Eavify (jQuery Plugin) – olussier.net — Topsy.com

    [...] This post was mentioned on Twitter by Olivier Lussier, Doug Walters. Doug Walters said: RT @olussier: Got a blog or website talking about #EAv and still not using Eavify? Get it now! http://bit.ly/ak11oS [...]

  • http://olussier.net/2010/08/04/eavify-your-world/ Eavify Your World! [jQuery Plugin + EA Tools 0.3] – olussier.net

    [...] even more pleased to announce not only version 0.3 of EA Tools, but a brand new jQuery plugin named Eavify, which can be used on ANY web page – not only WordPress blogs. Just like EA Tools, Eavify [...]

blog comments powered by Disqus