After a long exile from tending to my projects here I am back in action now that I have accomplished many a home improvement project on our first fixer-upper and now that I have recuperated from the arrival of our firstborn (Hannah Lynn Jaeger, who is two weeks old today).
I will be working feverishly to catch up on email questions starting this weekend. Also I will post the user gallery in July as well as finally publish some long overdue updates to MenuMatic and MooScroll.

Recently it has been getting increasingly challenging to keep up with the great emails that you all send me (questions, comments, feature requests & thanks). And it will surely not get any easier in the days ahead. My wife and I are expecting our first born (Hannah Lynn Jaeger) this June! Also we are in the midst of purchasing a "fixer-upper", where I will experience the thrills of being my own maintenance man ;).
So I have decided to create a series of video tutorials to help answer some common questions and show the basics of how to use my scripts. I have started this weekend by making two videos showing the basics of setting up and using MenuMatic. I plan to also add videos showing some advanced MenuMatic techniques, as well as video tutorials for MooScroll and MooColumns as well.
There is also a distinct possibility that I may set up a forum since there are many knowledgeable users of MenuMatic, MooScroll, and MooColumns. And it is always healthier to have an interactive community for these kinds of things rather than a one-man-band.
I still fully welcome all emails.. just be understanding if I don't respond right away :)
And don't worry, I am still actively developing MenuMatic and MooScroll and will probably release an updated MenuMatic next weekend!
Labels: MenuMatic, MooColumns, MooScroll, video tutorials
I will be setting up a gallery of MenuMatic, MooScroll, and MooColumns being used in the wild. So, if you have used any of these in a project and want to show it off just shoot me an email with:
- The design company(or your) name and link
- a link to the site were it is being used
- and "gallery submission" in the title
I will add the ones I like best to the gallery and of course there will be a link to your company(or personal) site and your client's site.
Labels: MenuMatic, MooColumns, MooScroll
When I recently learned that the submenus in MenuMatic were not being positioned correctly in IE7 (when the zoom level was not 100%) I had to figure out how to detect the current zoom amount. I read a forum post a week or so ago where someone suggested using flash and setting the stage to not scale. I have since looked for that post to give the poster credit but I could not find it. However I used the general idea, and decided to share the flash file in case anybody else needed it (since I mostly found people asking how to detect the zoom level but no working examples).
How It Works:
Basically the movie is 100px wide, the stage's scaleMode is set to not scale, and there is an onenterframe function to detect the stage width and send it to the javascript function. Although when it detects the stage's width it is actually detecting the movie's width while the stage stays at 100px wide. So if the zoom level is 120% it reads the "stage" width as 120.
The javascript function updates a global variable so you can access it easily. I am not normally a fan of global variables in javascript but felt it was an acceptable solution in this case. The flash file only runs at 1 frame per second, and is less than 2kb in size so it should not be too taxing on user resources.
To Use:
- Insert the .swf into the page.
- Hide it with css.
- Add 2 lines to your javascript (the function and the global variable)
Example
DownloadLabels: flash, ie7, MenuMatic, zoom
I just released MenuMatic 0.68 which has a few improvements and should be a little more efficient. Some of the improvements are:
- center option: A method I often use to center elements with css is setting the left to 50% and then the left margin to minus half the width of the element. This works really well when you know the width of the element is not going to change. But when your client has control to add or remove pages via a cms the menu width might change. So I added a center option to keep your menu centered even if the width of the menu changes.
- stretchMainMenu option: I renamed the menuWidth option to stretchMainMenu as that seems like a much more accurate name. Also I made it work much quicker. In case you have not used it, this option will stretch each link in your main menu until they fill the main ul or ol. So set stretchMainMenu to true and set a width on your main ol or ul in the css and you can simulate layouts that you can normally only achieve with tables.
- fixHasLayoutBug option: A few of you have run into Microsoft's hasLayout Bug, so if you find yourself troubleshooting a weird bug like the submenus all show up at the top of the window instead of by the link you are hovering over, then try enabling this option. It will force all the menu elements to have layout in IE, also all the parent elements of the menu since this is also important for getting accurate positioning. * Note I have not yet tested this, so if you end up using it please let me know if it works or not :)
- call-back functions: I added 18 callback functions to make modifying MenuMatic for different unique situations easier and faster. For example, if you need to do something right after a subMenu is positioned but before it is shown, you can use onPositionSubMenu_complete
- Google Code: I am now using Google Code to host MenuMatic so you can use the issue tracker there to report any bugs or submit feature requests. Thanks!
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
I am pretty sure I am addicted to Google Analytics. Ever since I first installed it on my site over a year ago ( and on every site I've built since ). I'm not sure what it is, since I am not a math geek, there is just something very interesting about trolling through the analytics of several different sites and comparing trends and see who is getting traffic from where and such.
On a completely unrelated note, I updated MooScroll over the weekend. Of the 3 projects I have released for download, MooScroll by far was the most raw. I hammered out several bugs and it should be much more stable than before. I also added an extra demo page with an OSX style layout.
Labels: MooScroll