I used this button for a while:
<input type="button" class="button" onclick="javascript:history.go(-1)" value="Go back to previus page" />
And I would like to add feature to it, but I have no clue, since im javascript newb, so please give me some tips or even solution.
I would like that you would get redirected from that page on which this button is located, automaticaly in 10 seconds (timmer should show on the actual button).
OR if you click you get redirected instant?
Any ideas how to do this with jquery?
No jQuery necessary. Put this in your header. It will call
history.go(-1)after 10000 milliseconds, or 10 seconds.I just noticed you want a timer on the button. This could use a little jQuery. While you are at it, you should move your inline javascript
onclick="javascript:..."to your script body. Inline javascript has fallen out of favor, mostly because it is a lousy way to do things.You could use
setInterval()also, but this let’s you set the button timer at time 0 a little easier.Example: http://jsfiddle.net/jtbowden/gJsPw/