Widget:costumeSwitcher: Difference between revisions
Jump to navigation
Jump to search
Pianoforte (talk | contribs) mNo edit summary |
Pianoforte (talk | contribs) No edit summary |
||
Line 13: | Line 13: | ||
$("#fullart_D a img").attr("src", costumePaths[1]); | $("#fullart_D a img").attr("src", costumePaths[1]); | ||
$("#fullart_D a img").attr("alt", costumePaths[1]); | $("#fullart_D a img").attr("alt", costumePaths[1]); | ||
$("#fullart_S a").attr("href", costumePaths[2]); | |||
$("#fullart_S a img").attr("src", costumePaths[2]); | |||
$("#fullart_S a img").attr("alt", costumePaths[2]); | |||
Line 21: | Line 25: | ||
// As we change the link, we have to update the Thumb-Cache of the Media Viewer | // As we change the link, we have to update the Thumb-Cache of the Media Viewer | ||
// Clear up the thumbs cache | // Clear up the thumbs cache | ||
mw.mmv.bootstrap.thumbs = []; | |||
// Search for all thumbs | |||
mw.mmv.bootstrap.processThumbs($("#content")); | |||
// Re-Init the viewer with the new thumbs | |||
mw.mmv.bootstrap.viewer.initWithThumbs(mw.mmv.bootstrap.thumbs); | |||
} | } | ||