Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Anything Zoomer: targeting coordinates? Re: Anything Zoomer: targeting coordinates?

#114396
Mottie
Member

Hi gin66!

You’ll need to include the code that reads the rel attribute. [See it here](https://github.com/CSS-Tricks/AnythingZoomer/blob/master/image.html#L26-37)

$(‘.president’)
.bind(‘click’, function(){
return false;
})
.bind(‘mouseover click’, function(){
var loc = $(this).attr(‘rel’);
if (loc && loc.indexOf(‘,’) > 0) {
loc = loc.split(‘,’);
$(‘.zoom’).anythingZoomer( loc[0], loc[1] );
}
return false;
});