uiRow

uiRow


Hey
I wrote a little function to extends UI, it supposed to help setting
elements into horizontal row (grids) e.g.
*** HTML ***
<div id="parow">
    <div>col 0</div>
    <div><i>col 1</i></div>
    <div>col 2</div>
</div>
*** JS ***
$("#parow").uiRow();
*** result ***
col 0 col 1 col 2
the code
jQuery.fn.uiRow = function() {
    var dir = ($("html").attr("dir") == "rtl") ? "right" : "left";
    $.each(this.children(), function(i, n){
        var style = (n.style != "") ? n.style + ";float:"+dir+";" : "float:"+dir+";";
        $(n).attr("style", style);
    });
    $(this).append('<div style="clear:both;"/>');
}
Am very new to jQuery, I learned about it few days ago, and learned
about UI just today, if I done something wrong, don't slam me
- adel