Don’t Pollute the Global Space; Namespace It!
Posted on | November 7, 2008 | 1 Comment
I like to namespace my code with object literals to contain all my functions and classes. It keeps things organized, decreases global space pollution from additional functions, and prevents conflicts with third-party scripts. It’s very easy to extend too. Read more
Get Around Form submit() Mapping
Posted on | November 3, 2008 | 1 Comment
If you’ve had to use javascript to submit a form, you may have used the forms submit() method. You may also experienced difficulty, such as a “submit is not a function” error. It has to deal with mapping and I’ve got a very simple solution. Read more
Jon Tan shows how to get @font-face to work on IE
Posted on | November 2, 2008 | No Comments
If you’ve designed a website or built one based off of a designer’s vision, you’ll understand the frustration when they don’t want to use a common font and you have to explain why they should. There are a bunch of options of course, like sIFR and CSS image replacement. sIFR requires Flash and javascript, while CSS image replacement basically hides the text while an image with the text is placed in the background. Then there’s the CSS @font-face construct which allows you to use an actual font file. There are two different implementations used between IE and the other popular browsers, and a whole mess about using licensed fonts. Jon Tan informs us by giving a brief background about using licensed fonts and clarifying how to use @font-face in IE. Be warned though; the implementation of using @font-face in IE requires IE conditional comments.
Thank you Jon, for such a great in-depth article. Really nice work.
What I Learned About Multi-threading in JavaScript
Posted on | October 31, 2008 | 2 Comments
There’s no such thing. Correct me if I’m wrong, but multi-threading in javascript does not exist. But we can simulate it, as is discussed by James Edwards. How does it work?
It all hinges on the use of asynchronous timers. When we run repetitive code inside an asynchronous timer, we’re giving the browser’s script interpreter time to process each iteration.
Aaron Newton brings back $E for MooTools 1.2.1
Posted on | October 29, 2008 | 2 Comments
In Aaron Newton’s announcement of his beta plugins, he’s brought the $E function back, and then some. $E, a function for returning the first element from a selector in MooTools 1.*, was removed from the beta and final release of MooTools 1.2.1. Read more
MooTools.Floor Does Form Validation Right!
Posted on | October 22, 2008 | 1 Comment
We’ve all dealt with form validation one way or another and I didn’t find one to my liking. I was mulling over the idea of writing my own for a while and then I read Ajaxian’s blog today about a really awesome MooTools form validation class from MooTools.Floor. MooTools.Floor actually announced their FormCheck v1.4 form validation class in July 25, 2008. Read more
Ready for display:table? I think not.
Posted on | October 22, 2008 | 1 Comment
Rachel Andrew wrote an article about the CSS display property to include a few new tricks in IE8.
When released, Internet Explorer 8 will support many new values for the CSS display property, including the table-related values: table, table-row, and table-cell—and it’s the last major browser to come on board with this support. This event will mark the end of complex CSS layout techniques, and will be the final nail in the coffin of using HTML tables for layout. Finally, producing table-like grid layouts using CSS will be quick and easy.
I agree this is great news, and her examples leaves me drooling at its potential, but we need to remember that majority of users, in our vast web, is still using IE6/IE7, which lacks support that IE8 will gain. Read more
Moo-Comet aka MooTools Request.Comet
Posted on | October 21, 2008 | 1 Comment
Ever heard of Comet? I heard it long ago when it just started out in Ajaxian’s post. They described it best:
Alex Russell has coined a term for a flavour of Ajax that’s been getting more attention of late. Comet describes applications where the server keeps pushing – or streaming – data to the client, instead of having the browser keep polling the server for fresh content.
Correct me if I’m wrong but I think the Dojo framework may have been the first to support Comet. Some of the uses I know of is chat and stock ticker updates but I’m sure there are tons of uses.
Now, when I learned about Comet, I was using MooTools 1.0/1.11. I was really interested in trying out this new tech and was trying to learn as much as I could. I knew that MooTools didn’t have a Request.Comet so I looked into building one. Long story short, I wasn’t successful because other projects took up my time, but my curiosity never went away.
Doing a search for Moo-Comet has led me to Benjamin Hutchins and his Request.Comet example. He has a MooTools 1.2 and 1.1 version of Request.Comet.
His code us up on Google Code for all the world to see. Great job, Ben! I can call you Ben, right?
MooTools Delete Key
Posted on | October 20, 2008 | No Comments
David Walsh has kept us informed in his post about the delete key event.
To detect the delete key, this does not work because ‘delete’ is a reserved word in javascript:
1 | var isdel = Event.Keys.delete; |
So here is the proper way:
1 | var isdel = Event.Keys['delete']; |
He put it best:
As flexible as Moo’s language is, you can’t get around the reserved words!
Great job on keeping the MooTools community well informed, David!
Two columns with unordered lists
Posted on | October 17, 2008 | 5 Comments
David Walsh recently posted “Get WordPress Post Categories“, where he talked about using the wordpress get_categories() function to create a two column list of his categories in his theme.
I offer a slightly different approach using an unordered list. Read more
« go back — keep looking »