Blog
016819th since April 04, 2007
R
Jan 30, 2008 ( Wednesday )
( 234 )
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.
...More
Add tags: AJAX jQuery Photo

by xicheng
23:16:08 | Modify entry
Add a comment:

Read the Guidance for the first time users

Need browser cookie to submit properly

Name:
Code: