92
rated 0 times
[
96]
[
4]
/ answers: 1 / hits: 58827
/ 12 Years ago, fri, may 18, 2012, 12:00:00
I have a button on my webpage which when onClick I want it to show another div. However when I click the button it will flash in the url that it went to the correct div but then it will immediately redirect back to the main div, #home.
Code for button:
<input type=button class=flip value=Redirect To Div onClick=window.location='#targetDiv' />
When I click the the button the url will flash:
www.XXXXX.com/#targetDiv
Then go immediately to www.XXXXX.com/#home
Any ideas why it won't display the div?
Thanks
More From » html