rosa-build/doc/design/js/checkbox.js

35 lines
661 B
JavaScript
Raw Normal View History

function changeCheck(el)
{
var el = el,
input = el.getElementsByTagName("input")[0];
if(input.checked)
{
el.style.backgroundPosition="0 0";
input.checked=false;
}
else
{
el.style.backgroundPosition="0 -17px";
input.checked=true;
}
return true;
}
function startChangeCheck(el)
{
var el = el,
input = el.getElementsByTagName("input")[0];
if(input.checked)
{
el.style.backgroundPosition="0 -17px";
}
return true;
}
function startCheck()
{
startChangeCheck(document.getElementById("niceCheckbox1"));
}