jQuery sIFR Plugin

Download

jQuery Sifr Plugin v2.0 Beta 3
Minified Js (4.30k)
Uncompressed Js (7.21k)
All-in-One Zip (187k)
Homepage
jQuery Flash Plugin v1.0.1
Minified Js (3.23k)
Uncompressed Js (8.31k)
Homepage
jQuery v1.2.6
Minified Js (54.2k)
Uncompressed Js (97.8k)
Homepage
sIFR Flash Font Source v2.0.5
All-in-One Zip (6.56k)
Homepage
Author
Jonathan Neal
jneal@liferay.com
Last Updated
September 25th, 2008

Back to Top

Description

What is the jQuery sIFR Plugin?

The jQuery sIFR Plugin is an addon for jQuery that makes it easy to replace text in a web page with flash text (sIFR).

What does it do?

It gives you a function in javascript to replace text in a web page dynamically with sIFR (Scalable Inman Flash Replacement) text, using native jQuery functionality along with the jQuery Flash Plugin.

Image of the jQuery sIFR Plugin in action.

How does it work?

First, jQuery makes finding the item(s) that you want to replace as easy as using CSS. Then, the jQuery sIFR Plugin does all the work of figuring out the text, files, sizes, colors, and any other configurations needed for the conversion. The jQuery sIFR plugin is fully configurable and can choose how little or how much you want to customize the display of the sIFRed text. Finally, the jQuery Flash Plugin does a most excellent job of embedding the sIFR flash into your web page. After all is said and done, you should have beautiful sIFR replaced text with consistent behavior across all major browsers.

And what is jQuery?

jQuery is a small but power-packed bundle of javascript functions that make writing javascript quick and simple. Selecting elements on your page is like using CSS, learning and using functions requires minimal fuss, and the learning curve is sometimes described as "zero".

So, why do I also need the jQuery Flash Plugin?

The jQuery Flash Plugin is the best tool for embedding flash into a web page. It's basically SWFObject written in jQuery. It's better in my opinion because it's as intuitive and configurable as jQuery, and it uses jQuery's native functionality to the eliminate the otherwise code redundancy in SWFObject, meaning you get a much smaller filesize and even faster loading.

Nice!

I know. Get it now!

Back to Top

Features

The jQuery sIFR Plugin strives to make configuration simple and intuitive. Specify what you need, and nothing more -- sensible defaults take care of the rest.

Back to Top

Examples

In this example, we change the text of an element with the id of oldtype into red Medici sIFR text.

<div id="oldtype" style="font: 8em 'Times'; ">Sample Text</div> <input type="button" value="sIFR this..." onClick="$('#oldtype').sifr({font: 'fonts/Medici Text', color:'#f00'}); "> <input type="button" value="UnsIFR this..." onClick="$('#oldtype').sifr(false); ">

Sample Text

 

In this example, we save some settings for later use.

<script type="text/javascript"> $.sifr({ path: 'fonts/', color: '#060' }); </script> <div id="gunmetal" style="font: 5em 'Times'; ">Sample Text</div> <input type="button" value="sIFR this..." onClick="$('#gunmetal').sifr({font: 'Gunmetal' }); "> <input type="button" value="UnsIFR this..." onClick="$('#gunmetal').sifr(false); ">

Sample Text

 

In this example, you can test your own results with my plugin.

<div id="test" style=""> </div> <input type="button" value="sIFR this..." onClick="$('#test').sifr({}); "> <input type="button" value="UnsIFR this..." onClick="$('#test').sifr(false); ">

Sample Text

Back to Top

Known Issues

In Opera Browsers, you must set the font in the function (e.g: $('h1').sifr({font: 'font name'});), because Opera drops unregistered fonts from CSS. Apparently, they don't want to dream.

You should not use jQuery packed with this plugin (or ever for that matter). If you do use jQuery packed with this plugin, Internet Explorer will probably display a "click to activate" border on every sIFR replacement.

Back to Top

License

jQuery Sifr Plugin uses a dual MIT/GPL license.

MIT License

Copyright (c) 2008 Jonathan Neal

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

GPL License

jQuery Sifr Plugin by Jonathan Neal

Copyright (C) 2008 Jonathan Neal

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see .

Back to Top

Write Me

Feel free to leave me any questions, concerns, encouragement, or any other feedback related to the jQuery sIFR Plugin.

Your Email:
Subject:
Message:

Back to Top