Recent Project News

|

While this plugin was initially one of my jQuery Misc plugins, it seemed useful enough to “promote” to its own project page. Congratulations jQuery throttle / debounce, you’ve “made it big!”

That being said, jQuery throttle / debounce allows you to rate-limit your functions in multiple useful ways. Passing a delay and callback to $.throttle returns a new function that will execute no more than once every delay milliseconds. Passing a delay and callback to $.debounce returns a new function that will execute only once, coalescing multiple sequential calls into a single execution at either the very beginning or end.

Just take a look at the project page to see more explanations (both textual and visual), documentation and working examples!

If you have any feedback or suggestions, please leave them in the comments, and if you find this plugin useful, please donate!


|

I haven’t had a reason to update jQuery doTimeout in a long time, mainly because nobody has had any suggestions on how to improve it.. until last night, when Brandon Aaron suggested that, “hey, wouldn’t be great if doTimeout could be called like this: $('div').show().doTimeout( 2000, 'hide' ), passing a string jQuery method name instead of a function reference?”

Well, it seemed like a great idea to me, so I took a look at the plugin, spent about fifteen minutes adding four lines of code.. and then spent another few hours updating documentation, examples, and unit tests.

The end result is version 1.0, which makes it even easier for people to delay execution of their jQuery methods. Just take a look at the first hover intent example to get an idea of how easy it is now!


|

With jQuery clickoutside event you can bind an event that will be triggered only when the user clicks outside the element in question. And because a reference to the clicked element is available as event.target you can change behavior based on what element is clicked.

This a fairly simple example of a jQuery “special event” plugin, so if you want to write one of your own, feel free to take a look at the fully commented source code. If you just want to, like, actually use the plugin, check out the project page!


|

This jQuery BBQ release incorporates the recently-updated jQuery hashchange event v1.2 which fixed a bizarre bug in Safari, and a few other miscellaneous things:

  • The IE6/7 Iframe is now inserted after the body (this actually works), which prevents the page from scrolling when the event is first bound.
  • The event can also now be bound before DOM ready, but it won’t be usable before then in IE6/7. Meaning: you can do it, but be warned!

In addition, I:

  • Added the $.param.fragment.noEscape method, which allows designating characters to not be urlencoded in the hash, which can result in prettier-looking URLs.
  • Reworked the hashchange event internal “add” method to be compatible with changes made to the jQuery 1.4.2 special events API.
  • Unit-tested the plugin in jQuery 1.3.2, 1.4.1, and 1.4.2… and everything works!

Also, since the special events API in jQuery 1.4.2 has been reworked (fixing some serious issues), I recommend that you update to jQuery 1.4.2 as soon as possible. Keep in mind that jQuery BBQ prior to v1.2.1 will not be fully compatible with jQuery 1.4.2, because of the aforementioned API changes, so I recommend upgrading both BBQ and jQuery to the latest versions!

So, what are you waiting for, get the latest and greatest now!

Note: this post was originally for BBQ v1.2, but since it’s only been a few hours and I’ve already released BBQ v1.2.1, I’m just going to edit this existing post and hope that nobody notices. Except that I’m explicitly commenting about it in the post. Damn, you’ve found me out.


|

This morning, I decided to actually collect many of the little jQuery plugins I’ve created, that are too small for their own pages, into a single jQuery Misc plugins page. I’ll add more as they’re created, but here’s the current list:

Each plugin has both a full and minified version, along with a brief explanation and a small code sample, so check them out now!


|

I’ve just updated jQuery hashchange event to fix a bizarre bug in Safari. Apparently references to window.location become stale when pressing the back button from a page on another domain.

Of course, this broke the plugin for the one person who was doing this (thanks for the tip, Chris), but it’s now fixed, along with WebKit Bugzilla bug 34679 filed, and a few other miscellaneous things:

  • The IE6/7 Iframe is now inserted after the body (this actually works), which prevents the page from scrolling when the event is first bound.
  • The event can also now be bound before DOM ready, but it won’t be usable before then in IE6/7. Meaning: you can do it, but be warned!
  • The plugin is now unit-tested in jQuery 1.4.2pre, and everything works!

jQuery BBQ will be updated soon to incorporate these changes, but if you want them right now, you can just grab the hashchange event plugin!


|

With jQuery resize event, you can now bind resize event handlers to elements other than window, for super-awesome-resizing-greatness!

Long ago, the powers-that-be decided that the resize event would only fire on the browser’s window object. Unfortunately, that means that if you want to know when another element has resized, you need to manually test its width and height, periodically, for changes. While this plugin doesn’t do anything fancy internally to obviate that approach, the interface it provides for binding the event is exactly the same as what’s already there for window.

It’s easy to use, fun for the whole family, and will get those tough grass stains out of your favorite pair of pants, so check it out now!


|

jQuery Long Url, the “Uniform Resource Elongator,” uses the longurlplease.com short URL lengthening API to expand short URLs from at least 80 services, including bit.ly, is.gd, tinyurl.com and more!

And not only has jQuery Long Url been written to take advantage of the longurlplease.com API “batch” ability, where up to ten URLs can be lengthened per request, but it can optionally use any lengthening service, supporting any URL-per-request “batch” limitations, which minimizes the number of external requests made for faster performance.

Simplified, my Linkinus Style, utilizes an earlier, unreleased version of this plugin.. but now that it’s finally available for general consumption, consume away!


|

First, this minor jQuery BBQ bugfix release incorporates the just-updated jQuery hashchange event v1.1 which fixes a pretty obscure (but not entirely surprising) IE8 bug. No changes were made other than this very minor tweak, so if you’re not using the X-UA-Compatible IE=EmulateIE7 meta tag, you can safely ignore this update. If you are, then run—don’t walk—to the plugin page right now for the v1.1.1 update!

Second, a lot of people ask which version of jQuery they should use with BBQ. Since the plugin has been coded with both jQuery 1.3.2 and 1.4+ in mind, it fully works (and has been unit tested) with both versions. And since 1.4 has seen some major speed increases, as well as some powerful event enhancements and a much improved .param method (both of which BBQ utilizes) I recommend that version.. but either will work just fine!

Please note that if you’re using jQuery 1.4, due to an event namespacing bug I recommend that you upgrade to jQuery 1.4.1 ASAP, which addresses this and a few other issues.

Also, I want to thank Vincent Voyer for not only bringing the IE8 issue to my attention, but also using the GitHub issue tracker to report the bug, which made it easy for me to address!


|

I’ve just updated my Simple PHP Proxy script. It now defaults to JSON mode, which can be changed to native mode by specifying ?mode=native. Also, native and JSONP modes are disabled by default because of possible XSS vulnerability issues, but are configurable in the PHP script along with a URL whitelisting regex.

Check out the script, example, documentation and, yes, feline endorsement to see how everything works, download it onto your server, and have fun!


|

This release fixes a bug in IE8, when jQuery hashchange event is used on a page with the X-UA-Compatible IE=EmulateIE7 meta tag. Apparently IE behaves a little differently when the meta tag is used versus when the “IE7 Compatibility Mode” toolbar button is pressed, so the code has been updated and an additional unit test has been added.

If you use the hashchange event plugin and the X-UA-Compatible IE=EmulateIE7 meta tag, please update to v1.1 to fix this issue.

I want to thank Vincent Voyer for not only bringing this issue to my attention, but also using the GitHub issue tracker to report the bug, which made it easy for me to address! Also, I will update jQuery BBQ as soon as possible to take advantage of this bug fix.


|

Version 1.1 brings some substantial changes to jQuery BBQ. I reorganized the plugin code substantially, which allowed the core window.onhashchange event functionality to be broken out into a separate jQuery hashchange event plugin.

The end result is that while jQuery BBQ is still just as awesome as it’s always been, if you’ve wanted just a very basic, streamlined, normalized, cross-browser jQuery hashchange event without all the extra awesomeness that BBQ provides, it’s now available separately as jQuery hashchange event.

In addition, BBQ now has a new $.bbq.removeState method, which a few people have requested, as well as updated unit tests that utilize the most recent version of QUnit.

Check out the jQuery BBQ project page as well as the new jQuery hashchange event project page for more information, and let me know what you think!


|

With jQuery Message Queuing, you can process and manage operations on large queues of items or elements. You can throttle, giving each operation a little breathing room (firing tracking pixels, performing DOM manipulations). You can force multiple asynchronous operations to execute serially (AJAX requests).

Either way, this is a useful plugin.. but, of course, only if you need this kind of thing. Check it out now on the project page and let me know what you think!


|

After using Simple PHP Proxy in countless projects, I’ve finally decided to clean up my code, document everything, and share!

With Simple PHP Proxy, your JavaScript can access content in remote webpages, without cross-domain security limitations, even if it’s not available in JSONP format. Of course, you’ll need to install this PHP script on your server.. but that’s a small price to have to pay for this much awesomeness.

So, check out the script, example, documentation and, yes, feline endorsement to see how everything works, download it onto your server, and have fun!


|

jQuery getObject allows you to get and set properties of an object via dot-delimited name string. Inspired by the Dojo methods of the same names.

This plugin is useful if you have deep namespaces or data structures and don’t want to do excessive testing like: if ( a && a.b && a.b.c ) { ... } every time you need to get or set a property or invoke a method.

If that’s you, check it out now, and enjoy!

If that’s not you, check out something more interesting, like jQuery doTimeout or jQuery BBQ.

More Recent Project News