Alright so I feel like I’ll be sounding a bit confusing explaining this but Ill give it a shot. My site consists of two seperate webpages which ill call the main page and the menu page. At the top of each page exists a navigation bar with four options. The main page has several different areas which users can view which are shown via the nav bar and use of jquery show() and hide() functions. So basically someone clicks on the ‘contact us’ button everything else on the page is hidden and the contactUs div is shown. Ive set it up so that if you are on the menupage and click any of the nav links (except the one leading to the menupage) it will direct you to the root_url (which is the main page). What I cant figure out is how can I execute javascript or jquery after someone has clicked this link so that after being redirected to the main page I can show or hide the proper categories.
Sorry for any confusion!
function showContactUs(){
$("#contactUs").show();
$("#forms").hide();
$("#landlords").hide();
$("#apartments").hide();
$("#home").hide();
$("#aboutUs").hide();
}
You could use the url itself, or perhaps a better option is to just add a class to the different HTML/PHP files you are redirecting to:
js