بهترین راه اینه که از پلاگین Smooth Scroll جی کوئری استفاده کنی و به صورت یه فایل js به قالب اضافه کنی بعد برای هر منو یه سکشن تعریف کنی که با یه ID مشخص شده باشه مثلاً منوی درباره ما یه Section توی قالبت بساز بعد بهش این Id رو بده مثلاً #about
نمونه کد :
کد:$(function() { $('a[href*="#"]:not([href="#"])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html, body').animate({ scrollTop: target.offset().top }, 1000); return false; } } }); });





علاقه مندی ها (Bookmarks)