Blog
019407th since April 04, 2007
R
Jan 30, 2008 ( Wednesday )
( 261 )
Update with "Photo Album" page
(1) switched most hyperlinks to AJAX calls, so instead of changing the whole webpage, only photo image and its corresponding title are refreshed when clicking the listed photo hyperlink.

    Photo Album

the jQuery function used is pretty simple:

function showphoto(pid) {
    $.getJSON('/photos/showphoto.html', { p : pid }, function(sdata) {
        $('div#photo').html(sdata.image);
        $('h1#photoTitle').html(sdata.title);
    });
}


(2) removed some mouseover event settings of toggling hide/show of photo list.. many of them are kind of annoying.
Add tags: AJAX jQuery Photo

by xicheng
23:16:08 | Read article comments(2) | Track entry (2) | Ask xicheng
Modify an entry

Read the Guidance for the first time users or sign up for a new account

Need browser cookie to submit properly

Username: xicheng
Password:
Subject: