KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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
Tags (comma-separated)
Save Edits
Cancel