There seems to be a problem with the library jquery.anchor.jsthat gives me Uncaught TypeError: Cannot read property 'top' of null jquery.anchor.js:32in Chrome 14. I commented on this and replaced the public function:
$("div.ftropen").click(function(){
$("div#connect").animate({height: "500px" }, "fast", function() {
$("body").scrollTop( $("#connect").position().top);
});
$("div#ftrconnect").fadeOut("fast");
$("div#ftrhide").fadeIn("fast");
return false;
});
which scrolls the body to the top <div id="connect">
I will see if I can create the animate animate and hellip plugin;
Anchor Slider, -, <div> click. <a> . , Anchor Slider "" jQuery animate() .
: jquery.anchor.js script,
<div id="connect" style="height:0px; display:block;"><a style="display:block;margin-top:500px;height:100px;" id="target" name="target">f</a></div>
JavaScript:
$(document).ready(function() {
$('div.ftropen').click(function(event){
$('div#connect').animate({height: '500px' }, 'fast', function() {
$('body').animate({scrollTop : $('#target').position().top + 500}, 700);
});
$('div#ftrconnect').fadeOut('fast');
$('div#ftrhide').fadeIn('fast');
event.stopPropagation();
return false;
});
$('div.ftrclose')
.click(function(){
$('div#connect').animate({height: '0px' }, 'fast');
$('div#ftrhide').fadeOut('fast');
$('div#ftrconnect').fadeIn('fast');
return false;
});
});
<a id="target">, <div> .
Edit2: .