Add Zoom Image at MediaWiki

MediaWiki:Common.css

.transition {
-webkit-transform: scale(1.8);
-moz-transform: scale(1.8);
-o-transform: scale(1.8);
transform: scale(1.8);
}

 

MediaWiki:Common.js

$(document).ready(function(){
$(‘.thumbinner’).hover(function() {
var src= $(this).find(‘img:first’).attr(‘src’);
var arr=src.split(“/”);
arr[7]=””;
var src=(arr.join().replace(“,”,”/”).replace(“,”,”/”).replace(“,”,”/”).replace(“,”,”/”).replace(“,”,”/”).replace(“,”,”/”).replace(“,”,”/”).replace(“/thumb”,””).replace(“jpg/”,”jpg”).replace(“jpg/”,”jpg”));

$(this).find(‘img:first’).attr(‘src’,src);
$(this).addClass(‘transition’);

}, function() {
$(this).removeClass(‘transition’);
});
});

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s