Well this simple test demonstrates that ctrl-clicking the images results in an instant feedback, so there's something else going on that needs to be diagnosed.
HTML Code:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
img {width: 150px; height: 100px; padding: 0.5em; margin: 0.5em;}
.highlight {background: yellow;}
</style>
</head>
<body>
<p>Ctrl-click to toggle yellow highlight</p>
<!-- Kitten images from google -->
<img src="https://encrypted-tbn1.google.com/images?q=tbn:ANd9GcSpRT1r-8sGQlBbXUumkmFJoJc3xwUKrR33zrF1u9EmE_yuY5fmiQ">
<img src="https://encrypted-tbn1.google.com/images?q=tbn:ANd9GcSN-OagC3hjPamrtx5IlX5kFe4fHXq3IpSwKSar9JeKn5xWMBeE">
<img src="https://encrypted-tbn0.google.com/images?q=tbn:ANd9GcQUcckupaPZs5uXR6w-rvuflgN4kEkVQdBmUNPzLCIZIoL616e4">
<img src="https://encrypted-tbn1.google.com/images?q=tbn:ANd9GcRtER58xC4xoi7g1gthsiqCYCq61LwuR1LJ2RorTeHqLP1neF4jIA">
<img src="https://encrypted-tbn3.google.com/images?q=tbn:ANd9GcTMhU4n1ilzF9NwXlTkzid56EKg9t9eVb_g4wJoPgVAbRQdXf2G">
<script>
function toggle(el, value) {
if (el.className != value) {
el.className = value
} else {
el.className = '';
}
}
function imageClickHandler() {
if (window.event.ctrlKey) {
toggle(this, 'highlight');
}
}
var images = document.getElementsByTagName('img'),
i;
for (i = 0; i < images.length; i += 1) {
images[i].onclick = imageClickHandler;
}
</script>
</body>
</html>
Bookmarks