During the development of the first releases of PassPack, I adopted Easy
DOM Creation by Michael Geary to quickly manage the DOM elements. But,
with the beta4 version of PassPack I needed to overcome Michael's
library's limits (due to the compatibility with Prototype). So I
developed jQuick. The new version 1.2 is more complete.
(
If you want to try the unofficial beta4preview of PassPack you could
connect to
https://www.passpack.com/beta4preview
Let me know your comments
)
How jQuick works
Suppose you want to obtain the following html code:
<div class="big">
<span id="one" class="ps">Hello Joe<i>!</i></span>
</div>
Using jQuick you could create the corresponding DOM elements with the
following code:
$.DIV({'class':'big'},
$.SPAN({id:'one','class':'ps'},
'Hello Joe', $.I('!')
)
);
Now suppose that you want to append to the big div an animated SPAN
element. You could write:
$('#big').append(
$.SPAN(
{id:'one','class':'ps'},
'Hello Joe'
).animate({left: 50,opacity:'show'},1000)
);
jQuick supports HTML code. So you could write:
$.DIV({'class':'big'},
'<span class="ps">Hello Joe<i>!</i></span>'
);
It is useful if you have to pass the innerHTML of one tag to another.
jQuick supports events if passed as attributes, even with IE. For
example, instead of
$.FORM({},
$.LABEL({'for':'one'},"Digit "),
$.INPUT({id:'one'}).click(setValues)
).bind('submit',function(){return false;});
you could write:
$.FORM({onsubmit:'return false;'},
$.LABEL({'for':'one'},"Digit "),
$.INPUT({id:'one',onclick:'setValues()'})
);
jQuick preserves spaces.
Download it at http://jquick.sullof.com
Francesco Sullo
[EMAIL PROTECTED]
www.sullof.com
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/