If i have elements such as this
<img src='0.jpg' id='images' />
<img src='...' id='myEle' />
<img src='...' id='myEle' />
in jQuery can i do something like this
$(document).ready(function() {
$('#myEle').mouseup(function () {
$('#images').attr("src", myEle.getNumber() + ".jpg");
}
}
Obviously each element is sorted in the correct number format that corresponds to the myEle
array number
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…