@sofiapapa08 said in Submenu anchor not clickable when on another page + on mobile menu !:
jQuery(document).on( 'click', 'a[href^="#"]', function(e){
e.preventDefault();
var hash = jQuery(this).attr('href');
var el = jQuery(hash);
var top = el.offset().top;
jQuery('html, body').animate({
scrollTop: top
}, 300, 'swing',
function() {
window.location.hash = hash;
}
);
} );
Hi!
I solved the question 1 and 2 by removing some things in the custom head content, here is my new code
<script>
window.laytheme.on('newpageshown', function(){
var hash = window.location.hash;
var el = jQuery(hash);
if(el.length > 0) {
var top = el.offset().top;
window.scroll(0, top);
}
});
</script>
<script>
window.laytheme.on("newpageshown", function(layoutObj, type, obj){
jQuery("body").append('<div class="pointer"></div>');
jQuery("body").on("mousemove", function(e) {
jQuery("nav.laynav .menu-item>a span").css({ top: e.clientY + "px", left: e.clientX + "px" });
});
});
</script>
<script>
jQuery(document).ready(function(){
jQuery('li.menu-item a').addClass('scrollTo');
});
</script>
For the question 3 I am still open to suggestions or any help :)
Thanks have a great week-end!
Sofia