I have a button on the top of my page that links to /#tabs (index id="tabs"). it uses a script to scroll nicely down to the id but it changes the url to www.domain.com/#tabs
how can I remvoe the #tabs
part? I was thinking about doing it in .htaccess
but not sure if thats possible and its proerbly a bad idea.
heres the html:
<a class="smoothscroll" href="/#tabs">
<div class="scroll-down"></div>
</a>
</header>
<br />
<div id="tabs" style="padding:20px;"></div>
<div class="tabs">
<h1>About</h1>
<div class="p">
about us
<a href="/contact"><input type="submit" value="Contact Us" class="btn" name="contact" style="min-width:15%;"/></a>
</div>
</div>
<a class="smoothscroll" href="/#tabs">
<div class="scroll-down"></div>
</a>
Is the button part and it uses this script to scroll smoothly
<script>
/*----------------------------------------------------*/
/* Quote Loop
------------------------------------------------------ */
function fade($ele) {
$ele.fadeIn(1000).delay(3000).fadeOut(1000, function() {
var $next = $(this).next('.quote');
fade($next.length > 0 ? $next : $(this).parent().children().first());
});
}
fade($('.quoteLoop > .quote').first());
/*----------------------------------------------------*/
/* Smooth Scrolling
------------------------------------------------------ */
jQuery(document).ready(function($) {
$('.smoothscroll').on('click',function (e) {
e.preventDefault();
var target = this.hash,
$target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 800, 'swing', function () {
window.location.hash = target;
});
});
});
TweenMax.staggerFrom(".heading", 0.8, {opacity: 0, y: 20, delay: 0.2}, 0.4);
</script>
just forget about the top of the script, thats just a part for the index.