Blog Has Moved
Tuesday, July 28, 2009
Since migrating my site to Drupal I now no longer use Blogger and hence my blog has moved here.
Since migrating my site to Drupal I now no longer use Blogger and hence my blog has moved here.
I just released MenuMatic 0.68 which has a few improvements and should be a little more efficient. Some of the improvements are:
Labels: css, javascript, MenuMatic, mootools
Here is a simple MooTools script that adds a getId method to the Element class. The getId method simply returns the element's id if it already exists, if not it generates a unique id, assigns it to the element and returns that. The generated id does not persist from page to page, however this little script comes in handy sometimes.
Element.implement({
getId: function(){
if(!this.get('id')){
var uniqueId = this.get('tag') + "-" + $time();
while($(uniqueId)){ uniqueId = this.get('tag') + "-" + $time(); }
this.set('id', uniqueId);
}
return this.get('id');
}
});
So usage would look like this:
var theIdofTheFirstLink = $(document.body).getElement('a').getId();
//or something like this would make sure every element on the page has an id
$$('*').getId();
Labels: javascript, mootools
A couple of years ago when I got into web design I decided to make my own javascript drop-down menu based on the fact that I could not find one out there with all the features I wanted. Several versions later when I found and fell in love with MooTools I immediately rewrote it for mootools. I have been using this for websites for some time now and recently made some more improvements and decided to release it for download. I plan on making several more sweeping improvements in the not-to-distant future (sometime before the holidays hopefully).
I mentioned in a previous post that I would be releasing this script under the name MooMenu but after some googling I found that it seemed that name had been used so I finally settled on the more original name of MenuMatic.

Essentially MenuMatic takes an ordered or unordered list of links and turns it into a dynamic drop down menu system with loads of options. Some advantages of MenuMatic are that it is based on semantic xthml structure, it is completely keyboard accessible, and easier to use than CSS based menus alone since you can adjust the hideDelay option, however it is based on a keyboard accessible version of Suckerfish Dropdowns for users without javascript enabled.
It should be pretty solid but as always email me or post a comment if you find any bugs.
Labels: javascript, MenuMatic, MooMenu, mootools
I just released MooScroll version 0.53 beta which has several enhancements over 0.52. It should now be much quicker and easier to plug into a design as it now plays nicer when the original element is positioned. Version 0.53 also has the following improvements.
fullWindowMode option You can use the fullWindowMode option to "replace" the window's scrollbar.
refresh function The refresh function lets you update the scrollbar (if, for instance, you change the size of the MooScroll object ).
loadContent function To dynamically update the content of a MooScroll object, just call the loadContent function passing in the new content as as string.
You can check out the updated examples to test it out:
Main MooScroll Example Page (including loadContent function demo)
fullWindowMode Example Page
Thanks to Bob Ralian for his contributions! Still on my To Do List is to add the ability for horizontal and/or vertical scrollbars (instead of just vertical). As always, you can email me or post a comment if you run across any bugs, or have any feature requests!
Labels: javascript, MooScroll, mootools
MooScroll lets you customize how the scrollbar looks on scrollable divs. Just customize the images and tweak the CSS if necessary and you have a customized scrollable div. You can have multiple instances on a single page. If the end-user does not have javascript enabled, they just see a regular scrollable div so it degrades gracefully.

Labels: javascript, MooScroll, mootools
A while ago I thought it would be useful / fun to have a script that divides content up into multiple columns. I know that CSS3 will have this ability but that day is probably still a ways off. I tried several multiple columns solutions out there and they all seemed to break in IE or not work very well in one way or another. So I created MooColumns.
With MooColumns you can choose how many columns you want, control how the columns and gutters look with CSS. Allow the script to auto-divide the content, or use column breaks (a span with the class of colBreak).
It requires MooTools 1.2 and has been tested in IE6, IE7, Firefox 2, Firefox 3, and Safari 3.
You can get the latest version of MooColumns from my MooColumns page.
Labels: javascript, MooColumns, mootools

Labels: javascript, MooColumns, MooFont, MooMenu, MooScroll, mootools