|
i have searched on google and written following code in another page which is inside iframe :
$(parent.document,'#home').click(function() {
$('html, body').animate({
scrollTop: $("#one").offset().top
}, 2000);
});
$(parent.document,'#compn').click(function() {
$('html, body').animate({
scrollTop: $("#four").offset().top
}, 2000);
});
$(parent.document,'#srv').click(function() {
$('html, body').animate({
scrollTop: $("#two").offset().top
}, 2000);
});
now it is animating, but still not animating properly.
it animates whole page twice and then stuck on one position only.
can anyone help me for that?
|