I’m trying to make while user clicks on region at map (#map-polska), page scrolls to #adresses div, but it doesn’t work with that code, and I can’t solve it – where the problem lays..
$('#map-polska').cssMap({
size: 500,
agentsListId: '#addresses',
onClick: function (e) {
$("html:not(:animated),body:not(:animated)").animate({
scrollTop: $('#addresses').offset().top
}, 1500);
}
});
I don’t know what’s
cssMapbut in order to conform to the usual jQuery model, your code should probably be :But maybe what you want is :
By the way, jquery’s css function accepts a map as parameter.