Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(){
- var partenaires = {
- init: function() {
- this.centerImg();
- },
- centerImg: function() {
- $('.partenaires').find('img').each(function() {
- console.log(this);
- //On récup la dimension de l'image
- var $this = $(this),
- widthImg = $this.width(),
- heightImg = $this.height();
- //On centre l'image
- $this.css({
- 'top':'80px',
- 'left': '160px',
- 'margin-left':-widthImg/2,
- 'margin-top': -heightImg/2
- });
- });
- }// centerImg()
- };
- partenaires.init();
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement