User:Huawei251/common.js: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
function ImageGroup() { |
function ImageGroup() { |
||
jQuery('div.ImageGroup').each(function(i, group) { |
jQuery('div.ImageGroup').each(function(i, group) { |
||
console.log(`group ${i}`); |
|||
var unitnode = jQuery('div.ImageGroupUnits', group).get(0); |
var unitnode = jQuery('div.ImageGroupUnits', group).get(0); |
||
if (unitnode == undefined) { |
if (unitnode == undefined) { |
||
console.log('A'); |
|||
return 1; |
return 1; |
||
} |
} |
||
Line 18: | Line 20: | ||
var count = units.get().length; |
var count = units.get().length; |
||
if (count <= 1) { |
if (count <= 1) { |
||
console.log('B'); |
|||
return 1; |
return 1; |
||
} |
} |
||
units.each(function(j, currentimage) { |
units.each(function(j, currentimage) { |
||
console.log(`unit ${j}`); |
|||
jQuery(currentimage).attr('id', "ImageGroupsGr" + i + "Im" + j); |
jQuery(currentimage).attr('id', "ImageGroupsGr" + i + "Im" + j); |
||
var leftlink = jQuery('<a href="#"/>'); |
var leftlink = jQuery('<a href="#"/>'); |