Posts Tagged ‘jQuery’

widgets w/ jQuery and Google Feed API

For a recent project, I was making series of AJAX based blog widgets (blogparts).  There wasn’t much of a problem except client server didn’t provide JSON-based API.  Instead of messing with their web-server, I’ve decided to use their RSS feed and Google’s Feed API.

read more…

Javascript packer

Thanks to Dean Edwards for releasing such a neat program. I’ve added a little option to convert script into bookmarklet. Basically, its just wrapping the compressed script with Bookmarklet script header :)

Well there was a single problem I’ve faced in IE6. Not sure why but version specific jQuery v1.3.2 on Google may not be compatible with IE6.

1
2
3
4
5
6
7
<!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js">
<script type="text/javascript">
    (function($){
        //code here
    })(jQuery);
</script>

For some reason it says “jQuery not defined”. Using 1.3.1 on Google solved the problem.

You can check out the packer here.

[EDIT]
There seems to be a problem with http://­ajax.googleapis.com/­ajax/­libs/­jquery/­1.3.2/­jquery.min.js with IE. Instead, consider using http://­ajax.googleapis.com/­ajax/­libs/­jquery/­1.3/­jquery.min.js.

Adding prompt text to text input with jQuery

A small plugin I made to show helper text for form text inputs. I’m sure there are tons of these going around the web already. Just learning from the basics.

I believe I made this as easy as possible. Well this requires jQuery color plugin but implementation is pretty straight forward.

1
$("input[name=single]").prompt("some prompt text");

Or you can just point whole text inputs and specify prompt text and its color.

1
2
3
$("input[type=text]").prompt({ 
                        text:"some placeholder text", 
                        color:"#FF0000"});

read more…

replacing 404 image with jQuery(2)

In my previous post, I’ve mentioned a way to load image using ajax but I’ve gotta admit it was pure hack ‘n slash method which wasn’t elegant at all. There’s an excellent jQuery plugin made by Ariel Flesler to handle image preloading nice and easy.

read more…

jQuery plugin to increase checkbox accessibility

Sometimes on IE and Firefox, when I click on the input label multiple times to toggle on/off quickly, clicking becomes text selection and checkbox won’t be toggled.  So I made a simple jQuery plugin to fix the checkbox usability.

read more…

swfobject generator with 1.5 support

SWFObject is the ultimate solution for embedding Flash contents. I’ve used SWFObject2.X for a while but because of the getSWFHTML method in previous SWFObject, I still favor 1.5 over 2. So I’ve added 1.5 support for swfobject generator in dynamic publishing.

Check it out here.

replacing 404 image with jQuery

I did a small experiment using jQuery to avoid broken/404 image.  This shouldn’t be used regularly but perhaps its a fail safe for some websites which I’m currently working on. Nothing new, just going over basics once again.

read more…

unicode range generator

I made a simple utility for generating unicode range for actionscript. Since I use FD over Flash these days, I tend to use more of scripted embedding for fonts. And I just couldn’t bother to remember any of those unicode codes!

Why bother to make this?  Well if its English based site, “Basic Latin” should be suitable, but when its Japanese then its a different story.  I wanted to specify every unique word to limit the file size.

Thanks to jQuery. Couldn’t be any easier.
unicode range generator

[EDIT]

Seems options like “Japanese (All)” doesn’t work on IE6.  I don’t know why but maybe loop is too big?

jQuery in Action

img_0724Just finished with Learning jQuery and moving on to next one, jQuery in Action.  Since I used to be a prototype kinda guy I never had a time to learn jQuery from zero.  Previous book wasn’t bad for a starter.  It contained some deprecated methods at v1.3 so beware people.

I’m currently using Aptana Studio for Javascript development.  I’m used to FlashDevelop’s auto-completion sooo much I noticed I’m making lotta typos.  I mean debugging javascript in IE  is just pain in the arse…Microsoft should learn from Firefox and Chrome SERIOUSLY.