0

I have JQuery UI tabs with Ajax and anchors (like a menu) for site navigation, all is working nice but when i click the previous/next page browser button, nothing happens,

i want to know if its possible to return to the previous tab when i click on the browser's previous button (same with next) .. for example, like on github when you're looking at a project source code.

can i set a function to execute when someone click previous/next page button ?

1
  • You are going to need to provide more information. Are these buttons always on your page? Are they refreshed by AJAX? Do they already have handlers that are supposed to be attached? Some code would be helpful.
    – Jeff B
    Apr 25, 2012 at 0:37

1 Answer 1

0

As long as you can select an element, you can have it react to click events. Here I chose ids.

http://jsfiddle.net/KVyz7/

Summary:

<img id="previmg" src="http://placekitten.com/75/100"><br>
<button id="prevbutton">Previous</button><br>
<div id="prevtext">Previous</div>

$("#previmg,#prevbutton,#prevtext").click(function() { $("#prevtext").html("<b>TO PREV?</b>") });
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.