That's only half (if that much) of the battle. I believe there is a better way than messing with the main script.

Originally Posted by
ursut
1. When mouse over a thumb, show "big" image in targetted div (rev='loadarea...), as usual.
2. When thumbnail is KLICKED you will be taken to a defined destination (like when the big image is klicked).
Well, yes - number 1 is no problem - it already does that if you configure it with:
Code:
rel="enlargeimage::mouseover"
Now, of course if you were to use:
Code:
rel="enlargeimage::click"
number 2 could never work out. So we must assume you are using the mouseover method. Now, where do you want it to go when the thumbnail is clicked? Like do you want it to go to the same place as the enlarged image, or to yet another page?
In any case, we can add this code to the head of the page:
Code:
<script type="text/javascript">
;(function(){
var extraClick = function(e){
e = e || window.event;
var t = e.target? e.target : e.srcElement? e.srcElement : null;
if(t)
t = t.rel && /enlargeimage::mouseover/.test(t.rel)? t : t.parentNode? t.parentNode : null;
if(!t) return;
if(t.rel && /enlargeimage::mouseover::.+/.test(t.rel))
window.location.href = t.rel.split('::')[2];
};
if(window.addEventListener)
document.addEventListener('click', extraClick, false);
else if (window.attachEvent)
document.attachEvent('onclick', extraClick);
})();
</script>
Now we can add a link for any thumbnail, ex:
Code:
<a href="bulb.gif" rel="enlargeimage::mouseover::http://www.google.com/" rev="loadarea">Thumbnail</a>
Bookmarks