Difference between revisions of "Template:ITB INDONESIA/dev/js"
Line 12: | Line 12: | ||
case /\/igem-meetup/.test(url) : | case /\/igem-meetup/.test(url) : | ||
case /\/monthly-journal/.test(url) : | case /\/monthly-journal/.test(url) : | ||
+ | case /\/seminar-uin/.test(url) : | ||
enableSlideShow(); | enableSlideShow(); | ||
break; | break; |
Latest revision as of 08:01, 18 September 2015
$(function() {
var url = window.location.pathname; url = url.substr(url.lastIndexOf('/'));
switch(true) { case /\/team/.test(url) : toggleBiodata();
break; case /\/synbio-seminar/.test(url) : case /\/project-socialization/.test(url) : case /\/igem-meetup/.test(url) : case /\/monthly-journal/.test(url) : case /\/seminar-uin/.test(url) : enableSlideShow(); break;
}
});
function toggleBiodata () {
$(".team-pic").click(function(event) {
var id = $(event.target).parents(".team-pic").attr('id'); if(!$("." + id).hasClass("open")) { $(".open").removeClass("open").slideToggle(); $("." + id).addClass("open").slideToggle(); } else { $("." + id).removeClass("open").slideToggle(); }
}); }
function enableSlideShow() {
$(document).ready(function() { $('.pgwSlideshow').pgwSlideshow(); });
}