Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function buildThumbs() {
- // voeg materiaal aan thumbs query toe
- if (!(materiaal === 'undefined')) {
- album += '&materiaal=' + materiaal;
- }
- current = 1;
- $('#imageWrapper').empty();
- $('#loading').show();
- $.get(baseurl + 'thumbs?album=' + album, function (data) {
- var countImages = getDataLength(data),
- count = 0,
- $tContainer = $('<div/>', {id: 'thumbsContainer', style: 'visibility:hidden;'}),
- thumb, // filling thumbswrapper here
- i = 0,
- $this;
- while (i < countImages) {
- if (countImages === 1) {
- thumb = data;
- } else {
- thumb = data[i];
- }
- $('<img desc="' + thumb.desc + '" alt="' + thumb.alt + '" height="75" />').load(function () {
- $this = $(this);
- $tContainer.append($this);
- count = count + 1;
- if (count === 1) {
- loadPhoto($this, "cursorPlus");
- }
- if (count === countImages) {
- $('#thumbsWrapper').empty().append($tContainer);
- thumbsDim($tContainer);
- makeScrollable($('#thumbsWrapper'), $tContainer, 15);
- }
- }).attr('src', thumb.src);
- i = i + 1;
- }
- }, 'json');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement