I have a site that uses jQuery to hide or display content in response to pressed buttons, so people can find the content they are looking for more quickly. However, I would like to be able to link targeted users to the page with particular types of content already displayed.
In simplest terms, the page is structured as follows:
<!DOCTYPE html>
<html>
<script src="jquery-1.8.3.js"></script>
<script type="text/javascript">
$(window).load(function(){
$("#b1").click(function(){
$(".type1").show();
$(".type2").hide();
});
$("#b2").click(function(){
$(".type1").hide();
$(".type2").show();
});
$(".type1").hide();
$(".type2").hide();
})
</script>
<body>
<button id="b1">1</button>
<button id="b2">2</button>
<div class="type1">This content is shown when button 1 is pressed.</div>
<div class="type2">When button 2 is pressed this content is shown.</div>
</body>
</html>
If I want to be able to send Person A a link to the site with the "type1" div initially displayed, and Person B a link to the same site with the "type2" div initially displayed, what is the most practical solution?
Please note: I am self taught programmer, and while I have done a lot of searching on this site, this is my first time asking a question. So I apologize in advance if there is anything wrong or odd with my question or formatting that I might otherwise be aware of.