Here is the thing
I have two div elements which I want only one of them be displayed and the other be hidden based on following situation:
The first div is a intro page with a button to hide first div and show second div.Second div is the main content of the page.
If user comes with a url that has no hashtag the first div will be shown(Intro) but there is possibility that the user comes with a hashtag in url .In this case I want to jump to second div and ignore intro
<div id="first-div">
<!--intro section-->
<button>Show details</button>
</div>
<div id="second-div" style="display:none">
<!--Details-->
<div id="description"></div>
<div id="comments"></div>
</div>
<script>
$(document).ready(function(){
$('button').on('click',function(){
$(this).parent().hide();
$('#second-div').show();
});
});
</script>
So the question is how can I handle hashtag in url with JQuery?Any idea?
Thanks in advance