Widget:Bookshelf: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 23: Line 23:
};
};


preload(imageObj);
 
$(".bookChapter").each(function() {
  var chapter = $(this).attr('id');
  srcLink = imageObj[chapter].faded.src;
  $(this).attr('src',srcLink);
});
 
$(".bookChapter").each(function() {
  var chapter = $(this).attr('id');
  srcLink = imageObj[chapter].selected.src;
  $(this).attr('src',srcLink);
});
 
$(".bookChapter").each(function() {
  var chapter = $(this).attr('id');
  srcLink = imageObj[chapter].normal.src;
  $(this).attr('src',srcLink);


$(".bookChapter").mouseover(function() {
$(".bookChapter").mouseover(function() {
Line 60: Line 76:
});
});


function preload(imageObj) {
$(".bookChapter").each(function() {
  var chapter = $(this).attr('id');
  srcLink = imageObj[chapter].faded.src;
  $(this).attr('src',srcLink);
});
$(".bookChapter").each(function() {
  var chapter = $(this).attr('id');
  srcLink = imageObj[chapter].selected.src;
  $(this).attr('src',srcLink);
});
$(".bookChapter").each(function() {
  var chapter = $(this).attr('id');
  srcLink = imageObj[chapter].normal.src;
  $(this).attr('src',srcLink);
});
}
}
</script>
</script>

Revision as of 19:35, 10 November 2014

 Dynamic Bookshelf on Wikidoc