|
A link on click call and animate div of another page using jquery
hello,
i have link in one page and on click on link i want to animate div which is inside another page.
i am using following code but it is not working.
$('#home').click(function() {
$('html, body').animate({
scrollTop: $("#f1 #one").offset().top
},2000);
});
another page is called in iframe.
#f1 is the iframe's id and #one is div's id.
i want if anyone click on home link #one should be animated and scroll to top using jquery.
please reply me soon.
|