update setButtonState
This commit is contained in:
parent
f64f3262ed
commit
a94550795b
|
@ -599,11 +599,11 @@ function scaleToFit(baseWidth, baseHeight, scaleEl, bottomEl) {
|
||||||
return {width: Math.floor(newWidth), height: Math.floor(newHeight), autoScale: autoScale};
|
return {width: Math.floor(newWidth), height: Math.floor(newHeight), autoScale: autoScale};
|
||||||
}
|
}
|
||||||
|
|
||||||
function setButtonState(element_id, butClass) {
|
function setButtonState(element_id, btnClass) {
|
||||||
var element = $(element_id);
|
var element = document.getElementById(element_id);
|
||||||
if ( element ) {
|
if ( element ) {
|
||||||
element.className = butClass;
|
element.className = btnClass;
|
||||||
if (butClass == 'unavail' || (butClass == 'active' && (element.id == 'pauseBtn' || element.id == 'playBtn'))) {
|
if (btnClass == 'unavail' || (btnClass == 'active' && (element.id == 'pauseBtn' || element.id == 'playBtn'))) {
|
||||||
element.disabled = true;
|
element.disabled = true;
|
||||||
} else {
|
} else {
|
||||||
element.disabled = false;
|
element.disabled = false;
|
||||||
|
|
Loading…
Reference in New Issue