Last change
on this file since 3876 was
3876,
checked in by nikrou, 15 years ago
|
Bug 1159: fix
Medium image are loaded in ajax mode.
|
File size:
827 bytes
|
Line | |
---|
1 | $(function() { |
---|
2 | $("a.load") |
---|
3 | .bind(ak_mouse_event, function() { |
---|
4 | $a = $(this); |
---|
5 | try { |
---|
6 | $.get($a.attr('href'),{}, |
---|
7 | function success(data) { |
---|
8 | $('#akPicture') |
---|
9 | .attr('src', data.AK_PIC_SRC) |
---|
10 | .attr('alt', data.AK_PIC_ALT) |
---|
11 | .attr('title', data.AK_PIC_TITLE); |
---|
12 | |
---|
13 | if (data.AK_PREVIOUS) { |
---|
14 | $('#akPreviousPicture') |
---|
15 | .removeClass('hide') |
---|
16 | .attr('href', data.AK_PREVIOUS); |
---|
17 | } else { |
---|
18 | $('#akPreviousPicture').addClass('hide'); |
---|
19 | } |
---|
20 | if (data.AK_NEXT) { |
---|
21 | $('#akNextPicture') |
---|
22 | .removeClass('hide') |
---|
23 | .attr('href', data.AK_NEXT); |
---|
24 | } else { |
---|
25 | $('#akNextPicture').addClass('hide'); |
---|
26 | } |
---|
27 | $a.click(function(e) { e.preventDefault();}); |
---|
28 | }, |
---|
29 | 'json'); |
---|
30 | } catch (e) { |
---|
31 | // alert(e); |
---|
32 | } |
---|
33 | return false; |
---|
34 | }); |
---|
35 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.