I have my portfolio website where I have put links to another section like this
Contact me
and I have also added preloader to my website.
Now there are my social media links in contact me section of my website.So when I click on them it redirects me to my social media profile.
Social media
But the problem is when I come back from the social media account to my portfolio site again, in spite of opening at home section it is directly jumping to contact me section. and the url-bar is showing like this
http://1xx.0.0.1:5500/index.html#contact
So how can I prevent this?
It's kind of a workaround but if it doesn't conflict with other functions of your page you could redirect the user on pageload
window.onload = function() {
window.location.replace("http://1xx.0.0.1:5500/index.html");
}
Related
I am a developing a it service website.
I have a service page where I am using javascript tab to showcase all the service like:-web-development, software development, web-hosting and more.
And on index page I have footer section. In footer I have a section called service in which I have links of service like:-web-development, software development, web-hosting and more.
I want that onclicking on any footer service link it will first go to service page (every anchor tag do). Then open the same footer link tab on service page.
If any one can help me then PLEACE
Just try it.
Try it!
I am creating a navigation bar for a website and I would like the button to link to the contact section on my homepage (index.html). Currently if you are on the page that has my portfolio and want to go to this section it just goes to the top of my homepage rather than the contact section which is about halfway down the page (has the alt id "#contact."
I currently have this code in my navbar class:
CONTACT
How can I make it go directly to an element with an ID from a link on an external page?
Do this:
CONTACT
I'm making a webpage that has links to my various social media pages. I want it that when the user clicks the link, if the user has the app for that social site, the link opens the app and if not it goes to it's web page.
So for example (I'll use the link to my Instagram page): If the user has the Instagram app on their device the href in the <a> tag will be instagram://user?username=USERNAME and if the app isn't on the device the href would be http://instagram.com/USERNAME. Does anyone know how I can do this, preferably using JavaScript? I'm considering window.navigator but I'm hoping there's a better way seeing as that just tells me what device/OS the user is using. I also want to do this for Twitter and Tumblr.
I'm building a single page app soon. Basically, there will be many pages, just like any other site, e.g.: Home, About Us, Contact Us, Games. But the Home.cshtml page will be the main page and when you click a menu item on the homepage, for example, the About Us link, then the content from the About Us page will be loaded and displayed into the Home.cshtml page in a div.
How would I go about loading content into a div from an external file? I have searched online but some of the solutions look messy and not very well explained and outdated, and it leaves me wondering if that is the best way.
I want to create a social media div locker. When a user comes to my site a piece of text is hidden behind a div locker that says "share this stuff on facebook, G+ or Twitter and you will see the locked text".
So, I want to make the hidden div visable after the visitor has pressed one of the social media buttons and actually shared it. How can I do it? I understand it has something to do with listening if the social media button has been pressed or smth.
you can use FB.Events.subscribe library.