I have this function , which is supposed to prevent the browser from doing the default action(event.preventDefault wink: which is navigating to another page to display a big otter image when you click the otter thumbnail in the index page .
function addThumbClickHandler(thumb) {
‘use strict’;
thumb.addEventListener(‘click’, function (event) {
event.preventDefault();
setDetailsFromThumb(thumb);
});
}
This code works on Firefox , but not on Chrome .
Any ideas why is this happening ?