Difference between revisions of "Team:Vilnius-Lithuania/Vilnius15 Script"
Line 1: | Line 1: | ||
+ | function myWikiReady() { | ||
+ | |||
+ | // put the footer in the right place | ||
+ | |||
+ | $("#footer-box").prepend($("#social-footer")); | ||
+ | |||
+ | |||
// Slideshows | // Slideshows | ||
− | $('.bxslider').bxSlider({ | + | $('.bxslider').bxSlider({ |
− | + | responsive: false, | |
− | + | auto: true, | |
− | + | autoHover: true, | |
− | captions: true | + | captions: true |
− | }); | + | }); |
+ | |||
+ | $('.bxgallery').bxSlider({ | ||
+ | captions: true, | ||
+ | slideMargin: 10, | ||
+ | minSlides: 3, | ||
+ | maxSlides: 3, | ||
+ | moveSlides: 1, | ||
+ | slideWidth: 5000 | ||
+ | }); | ||
+ | |||
+ | // Lightbox | ||
+ | |||
+ | $("div.thumbinner > a img").slimbox({}, function (el) { | ||
+ | url = el.src; | ||
+ | if (url.indexOf('thumb') != -1) { | ||
+ | url = url.substring(0, url.lastIndexOf('/')); | ||
+ | url = url.replace('/thumb/', '/'); | ||
+ | } | ||
+ | description = $(el).parents("div.thumbinner").children("div.thumbcaption").text(); | ||
+ | return [url, description]; | ||
+ | }, function (el) { | ||
+ | return (this == el); | ||
+ | }); | ||
+ | |||
+ | $("ul.bxgallery img").slimbox({loop: true}, function (el) { | ||
+ | url = el.src; | ||
+ | if (url.indexOf('thumb') != -1) { | ||
+ | url = url.substring(0, url.lastIndexOf('/')); | ||
+ | url = url.replace('/thumb/', '/'); | ||
+ | } | ||
+ | description = el.title + el.alt; | ||
+ | return [url, description]; | ||
+ | }, function (el) { | ||
+ | return (this == el) || (this.parentNode.parentNode && (this.parentNode.parentNode == el.parentNode.parentNode)); | ||
+ | }); | ||
+ | |||
+ | |||
+ | } | ||
− | $( | + | $(document).ready(myWikiReady); |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Revision as of 23:36, 11 July 2015
function myWikiReady() {
// put the footer in the right place
$("#footer-box").prepend($("#social-footer"));
// Slideshows
$('.bxslider').bxSlider({ responsive: false, auto: true, autoHover: true, captions: true });
$('.bxgallery').bxSlider({ captions: true, slideMargin: 10, minSlides: 3, maxSlides: 3, moveSlides: 1, slideWidth: 5000 });
// Lightbox
$("div.thumbinner > a img").slimbox({}, function (el) { url = el.src; if (url.indexOf('thumb') != -1) { url = url.substring(0, url.lastIndexOf('/')); url = url.replace('/thumb/', '/'); } description = $(el).parents("div.thumbinner").children("div.thumbcaption").text(); return [url, description]; }, function (el) { return (this == el); });
$("ul.bxgallery img").slimbox({loop: true}, function (el) { url = el.src; if (url.indexOf('thumb') != -1) { url = url.substring(0, url.lastIndexOf('/')); url = url.replace('/thumb/', '/'); } description = el.title + el.alt; return [url, description]; }, function (el) { return (this == el) || (this.parentNode.parentNode && (this.parentNode.parentNode == el.parentNode.parentNode)); });
}
$(document).ready(myWikiReady);