« MediaWiki:Common.js » : différence entre les versions
Contenu supprimé Contenu ajouté
je défais le yo-yo "jquery-dom-jquery", tout en conservant la possibilité de passer un élément dom natif |
jqueryfication de boucles |
||
Ligne 246 :
$element = $( $element );
}
var NavFrameCount = -1;
Ligne 619 :
Element = document.body;
}
▲ cont[i].id = 'img_toogle_' + i;
var ToggleLinksDiv = document.createElement('ul');
ToggleLinksDiv.id = 'geoboxToggleLinks_' + i;
$( Container ).find( '.geobox' ).each( function ( a, ThisBox ) {
ThisBox.id = 'geobox_' + i + "_" + a;
ThisBox.style.borderTop='0';
Ligne 646 ⟶ 643 :
ThisBox.style.display = "none";
}
} );
} );
}
function GeoBox_Toggle(link){
var ImgToggleIndex = link.id.replace('geoboxToggle_', '').replace(/_.*/g, "");
var GeoBoxIndex = link.id.replace(/.*_/g, "");
Ligne 662 ⟶ 658 :
return;
}
if (ThisgeoBox.id === Geobox.id) {
ThisgeoBox.style.display = "";
Ligne 670 ⟶ 664 :
ThisgeoBox.style.display = "none";
}
} );
$( Links ).find( 'a' ).each( function ( _, thisToggleLink ) {
if (thisToggleLink.id === Link.id){
thisToggleLink.parentNode.style.display = "none";
} else {
thisToggleLink.parentNode.style.display = "";
}
} );
}
|