June 2010
35 posts
Experimenting with CSS gradients →
was it up? →
Nice and simple website uptime monitoring service - much better than AreMySitesUp.com which doesn’t even work anymore…
1 tag
2 tags
jQuery: Search an array with partial matches
Need to find an element in an array with partial matches? Try this:
/*
JavaScript indexOf with partial matches for a jQuery array
eg: $(["boat", "sheep", "goat"]).arrayFind("he") => 1
eg: $(["boat", "sheep", "goat"]).arrayFind("oat") => 0
*/
$.fn.arrayFind = function(obj, fromIndex) {
if(fromIndex == null) fromIndex = 0;
else if(fromIndex < 0) fromIndex = Math.max(0, this.length +...
2 tags
jQuery: Reverse the order of a collection
Ever wanted to reverse the order of a collection of DOM elements in a jQuery object and tried to use Javascript’s reverse() method? Well now you can:
/*
Reverse a jQuery collection
eg: $("div").reverse().each(function() { ... });
*/
$.fn.reverse = function() {
return $(this.get().reverse());
}
No idea at all why this isn’t included in jQuery by default…
2 tags
jQuery live() not working?
“DOM traversal methods are not fully supported for finding elements to send to .live(). Rather, the .live() method should always be called directly after a selector.”
live() must be used directly after a selector, you can’t use it after a DOM traversal function such as filter() or not()
2 tags
Facebook Connect not working?
Apparently Facebook Connect relies on Flash “on some browsers” (which includes Google Chrome…) and so if your users are blocking flash - no Facebook Connect functionality for you!
Something to remember if you’re building a site that relies on Facebook Connect — you’ll be wanting to detect flash blocking and display a message.
Hope this saves some poor soul...
Notifo →
Notifo is a way for users to receive mobile notifications for anything. Services integrate with the Notifo API and send users notifications about events, announcements, whatever!
1 tag
jQuery Plugin: JSON →
JSON plugin for jQuery, provides simple ways to convert to JSON and back again.
Online javascript beautifier →
New Zealand Postcode Database (V2) | Noodles' Blog →
Can’t believe this is the only resource of its kind on the web (that I could find at least)…
1 tag
A Simple and Robust jQuery 1.4 CDN Failover in One... →
2 tags
Javascript RGB to Hex and Hex to RGB converters
Couldn’t find a single source with both these functions anywhere, so I’ve made my own and posted them here for everyone’s reference.
Convert a HEX value #FFFFFF to an array of RGB values [255,255,255]
// convert hex to rgb
function hex2rgb(hex) {
hex = (hex.substr(0,1)=="#") ? hex.substr(1) : hex;
return [parseInt(hex.substr(0,2), 16), parseInt(hex.substr(2,2), 16),...
Google Font Directory →
This is awesome. Google is awesome.
Delicious Library →
Catalog your books, movies, music, software, toys, tools, electronics and video games by simply holding them up to your webcam.
The All-In-One Almost-Alphabetical No-Bullshit... →
Simple ways to detect browser support for (almost) every HTML5 feature.
7 Awesome CSS3 Techniques You Can Start Using... →
1 tag