hi
I use below code for changing checkbox appereance:
<script type="text/javascript">
window.onload = function () {
ApplyCss();
};
function ApplyCss() {
$('input').iCheck({
checkboxClass: 'icheckbox_square-red',
radioClass: 'iradio_square-red',
increaseArea: '20%' // optional
});
};
//On PostBack
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
ApplyCss();
}
});
};
</script>
and below code for textbox's watermark:
<script type="text/javascript">
window.onload = function SetColorOnPageLoad() {
var defalutage = "مثال: 12 سال";
//var defalutTaText = "تا";
//var defalutsearch = "جستجو بر اساس کد ملک";
functionSetColor(document.getElementById("Txtage"), defalutage);
//functionSetColor(document.getElementById("Txtejare1"), defalutAzText);
//functionSetColor(document.getElementById("Txtejare2"), defalutTaText);
ApplyCss();
}
function functionSetColor(Textbox, WaterMark) {
if (Textbox.value.length > 0 && Textbox.value == WaterMark) {
Textbox.style.color = "#443f13";
Textbox.style.fontSize = "13.5px";
}
else {
Textbox.style.color = "white";
Textbox.style.fontSize = "13.5px";
}
}
function WaterMark(txt, evt, msg) {
if (txt.value.length == 0 && evt.type == "blur") {
txt.style.color = "#443f13";
txt.value = msg;
txt.style.fontSize = "13.5px";
txt.style.fontfamily = "behtop_Yekan";
}
if (txt.value == msg && evt.type == "focus") {
txt.style.color = "white";
txt.value = "";
if (txt.name == "Txtage") {
txt.style.fontSize = "16px";
}
else {
txt.style.fontSize = "13.5px";
}
txt.style.fontfamily = "behtop_Yekan";
}
}
function ApplyCss() {
$('select').selectric({
maxHeight: 200
});
};
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
ApplyCss();
}
});
};
</script>
problem is when I use both code in page first code(for checkbox) doesn't work how I can use these two code together?
best regards
neda