Greybeard
Greybeard

Reputation: 53

PHP mod_rewrite Anchors

I have mod_rewrite working with all my urls.

But I have some anchor links, such as Back to Top referencing #top.

I also have a jquery slider with a start stop button. This button uses a href="#" to trigger, but this is not starting or stopping the slider, instead it reloads the page. And therefore the slider goes back to slide 1 with the slider playing.

Any ideas?

Upvotes: 0

Views: 189

Answers (1)

margusholland
margusholland

Reputation: 3348

mod_rewrite has nothing to do with it. You need need prevent the default functionality of an A link.

Something in the lines of:

$('a.slidertrigger').click(function(e) {
    e.preventDefault();
});

Upvotes: 2

Related Questions