Archive for the ‘JavaScript’ Category

jQuery Cross-Site AJAX Plugin

Thursday, April 12th, 2007

It is well known that with the help of a dynamically generated XHTML <script> DOM element one can achieve a portable cross-site variation of an AJAX-style client-server communication as the <script> is not staying under the “same-origin security policy” which restricts the regular AJAX methods. This allows one to load code from a third-party URL in the background.

jQuery core and its 20KB limit

Tuesday, April 3rd, 2007

Triggered by recent code size discussions in the jQuery community, I’ve thought a little bit more about the “all dancing all singing 20KB jQuery core limit” which is often stated. You have not heard about this until now? Well, for acceptable reasons jQuery core is meant to be not larger than 20KB and to still reach this goal people optimize the jQuery core code by single characters — even if it IMHO sometimes obscures the code to some extend.

First, the “packer” compressed jQuery SVN as of today is 20961 bytes which actually is 20.46KB. Well, I’m personally fine with this. But I’m personally also fine with a jQuery of 30KB or even 40KB in size — as long as great functionality and stability is provided. And I can image that most people also care more about other factors than about a few KB more or less.


jQuery External Link Plugin

Sunday, April 1st, 2007

On the net one sometimes see web pages where hyperlinks to external URLs are visually marked with an additional icon placed at the end of the hyperlink. I found this always a neat effect and hence have created such a simple icon myself in a few colors and coded a very
small jQuery plugin jquery.extlink.js which allows me to automatically add such an icon to all web pages. Find this jQuery plugin in the File Repository area.

jQuery RegExp Selectors

Friday, March 16th, 2007

I don’t know why jQuery doesn’t already provide support in its selector syntax for the Perl-style operators “=~” and “!~“, but I really wanted this feature for regular expression based matching of DOM node attribute value matching:

jQuery Debugging Plugin

Friday, March 16th, 2007

Recently I was forced to debug my jQuery hacks in Internet Explorer (IE). I got extremely tired of having to use the nasty JavaScript alert() function for debugging while in Firefox I can use the cool Firebug plugin and its console.log() function. I thought Firebug is a Firefox/Firebug specific solution only. [more…]

JavaScript sprintf(3)

Thursday, February 15th, 2007

Some time ago I was extremely bored by the fact that on hacking JavaScript code I had no POSIX sprintf(3) style function available. Perhaps the puristic JavaScript-only coders might see no need for this, for a Unix hacker this gap has to be filled. Hence I’ve searched for an sprintf(3) implementation and found Jan Moesen’s small sprintf(3) implementation. [more…]

jQuery Scheduling Plugin

Thursday, February 15th, 2007

During my recent evaluation of JavaScript toolkits I came across jQuery. As mentioned in this other posting, I was really pleased by jQuery. Hence I’ve investigated further and immediately used jQuery to solve a few tasks. One of the results which came out of this jQuery hacking was a reusable scheduling plugin. [more…]