Jump to content

Year

Day

24 ways to impress your friends

Vote up?

  • Richard Rutter http://clagnut.com/

    Thanks for the kind words so far folks. Glad to hear that Polypage could come in useful for you too.

    Martijn van der Ven wrote:

    Is there any easy way that we could link the switching of states with on page elements? To use your example, make the login/logout link also toggle the mentioned state, and not only trough the bar at the top.

    Yes. By attaching an event handler to a logout link you can call the Polypage function to change the state. Something like this:

    $('#logout').click(
        function() {
          $.polypage.setState('logged_in',false);
        }
    )