Wednesday, 24 September 2008

YUI Grids CSS

Looking at CSS frameworks recently and the YUI Grids CSS in particular.

This seems to have come under some criticism for requiring non semantic markup, with class names such as yui-b.

Should be quite simple to write something to replace these classes with more semantic ones for a particular site. Sounds like a simple search and replace to me.

Does not deal with the need for lots of div's though, but I guess that is the price you pay for the flexibility offered by the framework.

Perhaps an alternative is a "framework" which does not try to produce a css file to handle all cases, but a framework generator which can produce you css based on a specification for the page..

Friday, 12 September 2008

Dynamic loading of javascript

I have been working on dynamic script loading with jquery and have this working

$.requireScripts(
new Array(
"/script/ui.core.min.js",
"/script/ui.draggable.min.js",
"/script/ui.resizable.min.js",
"/script/ui.dialog.min.js"), function(){
showADialog();
});

This will load the javascript specified in the first parameter before executing the function supplied as a second paramater.