I need a little help. I went div crazy on my site using a toggle class to hide and the divs in the middle of the page. Well a couple things first the website
The first is if you click on things eventually especially on the leftsidebar they don't switch, and a bigger problem is if I'm watching a video from the leftsidebar and a play another one, it switch's but the audio keeps playing.
I was thinking that if the user clicked on anything, it would refresh the page, then execute the href mand.
Can anyone help me in this area?
I need a little help. I went div crazy on my site using a toggle class to hide and the divs in the middle of the page. Well a couple things first the website http://gregedisonproductions.
The first is if you click on things eventually especially on the leftsidebar they don't switch, and a bigger problem is if I'm watching a video from the leftsidebar and a play another one, it switch's but the audio keeps playing.
I was thinking that if the user clicked on anything, it would refresh the page, then execute the href mand.
Can anyone help me in this area?
Share Improve this question edited Feb 23, 2017 at 19:53 Barry Michael Doyle 10.6k32 gold badges97 silver badges159 bronze badges asked Mar 11, 2013 at 18:07 user2157989user2157989 231 gold badge1 silver badge5 bronze badges 1- I'm not sure I understand what you mean by "execute the href mand". – scott.korin Commented Mar 11, 2013 at 18:29
2 Answers
Reset to default 11If you want to reload the page with href, you can try this
<a href="#" onClick="window.location.reload();return false;">Reload</a>
Your problem though involves the fact that when you click on another video, it doesn't stop the original one; it simply hides it. Youtube has an API that allows you to stop the video through javascript though. I believe to pause a video you can do a pauseVideo with the API.
If you want to redirect the URL, just add this to your onclick event, using PHP:
header("Location: http://yourpage./"); // add your URL
exit;
Using Javascrip:
window.parent.location = "http://yourpage./";