Hi, In HP my website I use link with anchor, but on the linked page my fixed menu hide my div with anchor and (maybe) javascript move div down?
A. link on HP:
bottom map click on any action (e.g. http://www.ceria.easysoftware.cz/akce/261-seminar-welness-gastronomie-mezirici#registerform)
B. Then look at my form without title 🙁
I tried some tricks:
- add span with anchor before my div and add css:
.anchor{
display: block;
height: 80px; /*same height as header*/
margin-top: -80px; /*same height as header*/
visibility: hidden;
}
-
add javascript before
jQuery(document).ready(function() {
jQuery( 'a' ).click(function() {
var href = jQuery(this).attr('href');
var arr=href.split('#');
var target='a[name="'+arr[1]+'"]';
jQuery('html, body').animate({ scrollTop:jQuery(target).offset().top - 60 },'slow');
});
});
</script>
<script language="javascript" type="text/javascript">
jQuery(document).ready(function() {
var hash = jQuery(location).attr('hash');
if( hash !== undefined ) {
var arr= hash.split('#');
var target='a[name="'+arr[1]+'"]';
jQuery('html, body').animate({ scrollTop:jQuery(target).offset().top - 60 },'slow');
}
});
</script>
but all my tricks is wrong 🙁
Can You help me?
Thanks
Rudolf