As I said, I want to write a JS framework. I know someone will go through my BS, but: Continue to BS! I still want to write my JOBJ. I don't have much time, most of which are written out of work.
The Code is as follows:
JObj. Dom. $ tag ("INPUT ")
. $ Filter (function (o ){
Var fa = o. parentNode;
Return f = (o. type = "text" & fa. id = "hollerNew ")? True: false;
})
. $ Css ({width: "570px", height: "18px", lineHeight: "18px "})
. $ Attr ({className: "hollerFormNormal "})
. $ Event ({
Onfocus: "vControl ('textfocus ', this )",
Onblur: "vControl ('textblur', this )"
})
. $ Tag ("TEXTAREA ")
. $ Css ({width: "570px", height: "100px", lineHeight: "18px "})
. $ Attr ({className: "hollerFormNormal "})
. $ Event ({
Onfocus: "vControl ('textfocus ', this )",
Onblur: "vControl ('textblur', this )"
})
. $ (Document. hollerNew)
. $ Event ({
Onsubmit: function (){
Return JObj. FormValidate. $ validate (this, rules );
}
});
JObj. Dom. $ (window)
. $ Event ({
Onscroll: "vControl ('fixtoolbar ')"
});
Var vControl = function (pChoice ){
Var args = arguments;
Switch (pChoice ){
Case "BACKER ":
Var backer = args [1];
Var id = args [2];
Break;
Case "FLOWERS ":
Var id = args [1];
Break;
Case "EGGS ":
Var id = args [1];
Break;
Case "TEXTFOCUS ":
Args [1]. className = "hollerFormFocus ";
Break;
Case "TEXTBLUR ":
Args [1]. className = "hollerFormNormal ";
Break;
Case "SHOWTIP ":
Var o, t;
Switch (args [3]) {
Case "FLOWER ":
O = "hollerTip_flower _";
T = "Flowers" + args [2] + "flower, send him/her one, and let her open a flower shop! "
Break;
Case "EGG ":
O = "hollerTip_egg _";
T = "eggs" + args [2] + ", if you are afraid of not hatching chicks, you are giving him/her one! "
Break;
Default:
Return;
}
JObj. Dom. $ (o + args [1])
. $ Attr ({innerHTML: t })
. $ Css ({display: "", position: "relative "})
. $ Show ("fast ",
{Width: 0, height: 0 },
{Width: 400, height: 18}
);
Break;
Case "HIDETIP ":
Var o;
Switch (args [2]) {
Case "FLOWER": o = "hollerTip_flower _"; break;
Case "EGG": o = "hollerTip_egg _"; break;
Default: return;
}
JObj. Dom. $ (o + args [1])
. $ Hide ("fast ");
Break;
Case "FIXTOOLBAR ":
JObj. Dom. $ ("toolBar ")
. $ Css ({opacity: 0.1, filter: "Alpha (Opacity = 10 )"})
. $ MoveToScrollTop ("fast ");
Break;
}
}