0

i have web page with vertical slider when i am running slider it is changing URL. I want to remove some text on page refresh. Like i have a URL 95.0.4.12/inner/innerpage3.html and when i am using slider it is changing this URL to inner/innerpage3.html#slide4 or whatever slider number

<script type="text/javascript">
$(function (){
var top= window.top.location.href;
window.onload=$(document).scrollTop(0)
})
</script>
2
  • so what do you want to remove? Commented Jul 23, 2012 at 6:02
  • i want to remove #slide4 Commented Jul 23, 2012 at 6:13

2 Answers 2

1

you can use document.location.hash try the following:

The hash property returns the anchor portion of a URL, including the hash sign (#).

$(function (){
    document.location.hash = ""
})
Sign up to request clarification or add additional context in comments.

Comments

1

You can use window.location.hash to change the hash part of the URL. You can also use document.referrer to detect which slide the user came from.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.