pashlaik man ir tada fukcija kurai vajadzetu samazinat jebkuru attelu arr masiva lidz vajadzigajam izmeram
function resizeImgmed(){
// ========================
// Customise these variables as you wish
// ========================
var _resizeWidth = 500;
var _resizeHeight = 333;
var _resizeClass = 'news-img';
for ( var i = 0; i < arr.length; i++ ){
var imgObj = arr[i];
if ( imgObj.className == _resizeClass )
{
imgObj.style.width = _resizeWidth + 'px';
imgObj.style.height = _resizeHeight + 'px';
}
}
}
unction selectElement(id, element_id)
{
//create border
selected = element_id;
redrawCarusel();
// atrod big elementu
var big = document.getElementById("big");
// pieškir pareizo onclick
big.setAttribute('onClick', 'displayElement(\''+ id + '\')');
// ieliek pareizo bildi
videja=resizeImgmed(arr[id]);
big.innerHTML = '<img src="' + videja + '" />';
}
un šī funkcija tiek izmantota attela paradishanai, bet attels neparadas vispar, tapec laikam kluda pasha pirmaja funkcija! kads zin kur?
Question
Sephy
pashlaik man ir tada fukcija kurai vajadzetu samazinat jebkuru attelu arr masiva lidz vajadzigajam izmeram
un šī funkcija tiek izmantota attela paradishanai, bet attels neparadas vispar, tapec laikam kluda pasha pirmaja funkcija! kads zin kur?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts