FANDOM


第9行: 第9行:
 
var temp = questions.children("center").not(':eq(-1)');
 
var temp = questions.children("center").not(':eq(-1)');
   
function bind($this, next) {
+
function bind($this, current, next) {
var current = $($this).parents('.question:eq(0)');
 
 
if(current.data('delay')) {
 
if(current.data('delay')) {
 
setTimeout(function() {
 
setTimeout(function() {
第24行: 第24行:
 
temp.children().css('cursor', 'pointer');
 
temp.children().css('cursor', 'pointer');
 
temp.find(':first-child').children().click(function() {
 
temp.find(':first-child').children().click(function() {
bind(this, questions.eq(parseInt(current.data('yes')) - 1));
+
var current = $(this).parents('.question:eq(0)');
  +
bind(this, current, 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)');
  +
bind(this, current, questions.eq(parseInt(current.data('no')) - 1));
 
});
 
});
 
 

2015年3月29日 (星期日) 12:10的版本

<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, current, next) { 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() { var current = $(this).parents('.question:eq(0)'); bind(this, current, questions.eq(parseInt(current.data('yes')) - 1)); }); temp.find(':nth-child(2)').children().click(function() { var current = $(this).parents('.question:eq(0)'); bind(this, current, 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>

除了特别提示,社区内容遵循CC-BY-SA 授权许可。