Tower of Saviors 維基
Tower of Saviors 維基
无编辑摘要
标签sourceedit
无编辑摘要
标签sourceedit
第7行: 第7行:
 
 
 
var questions = $('.question');
 
var questions = $('.question');
 
 
var temp = questions.children("center").not(':eq(-1)');
 
var temp = questions.children("center").not(':eq(-1)');
  +
temp.children().css('cursor', 'pointer');
 
  +
function bind($this, next) {
temp.find(':first-child').children().click(function() {
 
var current = $(this).parents('.question:eq(0)');
+
var current = $($this).parents('.question:eq(0)');
 
if(current.data('delay')) {
 
if(current.data('delay')) {
 
setTimeout(function() {
 
setTimeout(function() {
 
current.hide();
 
current.hide();
questions.eq(parseInt(current.data('yes')) - 1).show();
+
next.show();
 
}, parseInt(current.data('delay')));
 
}, parseInt(current.data('delay')));
$(this).off('click');
+
$($this).off('click');
 
return;
 
return;
 
}
 
}
 
current.hide();
 
current.hide();
  +
next.show();
questions.eq(parseInt(current.data('yes')) - 1).show();
 
 
}
  +
 
temp.children().css('cursor', 'pointer');
 
temp.find(':first-child').children().click(function() {
 
bind(this, questions.eq(parseInt(current.data('yes')) - 1));
 
});
 
});
 
temp.find(':nth-child(2)').children().click(function() {
 
temp.find(':nth-child(2)').children().click(function() {
 
bind(this, questions.eq(parseInt(current.data('no')) - 1));
var current = $(this).parents('.question:eq(0)');
 
current.hide();
 
questions.eq(parseInt(current.data('no')) - 1).show();
 
 
});
 
});
 
 

2015年3月29日 (日) 12:07的版本

<script> (function Terry2(){ if(typeof jQuery == "undefined") { setTimeout(Terry2, 100); return; }

var questions = $('.question'); var temp = questions.children("center").not(':eq(-1)');

function bind($this, next) { var current = $($this).parents('.question:eq(0)'); if(current.data('delay')) { setTimeout(function() { current.hide(); next.show(); }, parseInt(current.data('delay'))); $($this).off('click'); return; } current.hide(); next.show(); }

temp.children().css('cursor', 'pointer'); temp.find(':first-child').children().click(function() { bind(this, questions.eq(parseInt(current.data('yes')) - 1)); }); temp.find(':nth-child(2)').children().click(function() { bind(this, questions.eq(parseInt(current.data('no')) - 1)); });


questions.eq(0).show();

$('.wikia-logo').attr('href', 'http://zh.tos.wikia.com/wiki/臨時主頁');

$('a[href="https:\/\/www.facebook.com/zhtoswikia"]').attr('target', '_blank');

})(); </script>