Answer the question
In order to leave comments, you need to log in
How to make a block visible if there is # in the url?
Hello, there is such a question, for example, there are a couple of vacancies on the career page, they open when you click on a certain menu on the left of the page.
Working site
How can I make sure that when changing the url, for example , outsoft.com/careers#Business-Development-Manager , a specific job block appears?
Well, and accordingly, when you directly went to this URL ( outsoft.com/careers#Business-Development-Manager ), was there an open required vacancy for Business Development Manager?
Thanks for any help.
Answer the question
In order to leave comments, you need to log in
On the loading page, catch location.hash
.
$(function(){
//Адрес: http://site.ru#hash228
$(location.hash).show(); //Показать блок с id = "hash228"
//Или проверять что в хэше
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question