View Single Post
Old 02-08-2013, 07:30 AM   PM User | #1
prachippp
New Coder

 
Join Date: Jun 2011
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts
prachippp is an unknown quantity at this point
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.
prachippp is offline   Reply With Quote