Init ci
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
function powerhug() {
|
||||
// Centerize
|
||||
correctView();
|
||||
$(window).resize(correctView);
|
||||
|
||||
parsePhotos();
|
||||
}
|
||||
|
||||
function correctView() {
|
||||
if ($(window).width() > $('#main').width()) {
|
||||
$('#main').css('margin-left', (($(window).width() - $('#main').width()) / 2) + 'px');
|
||||
}
|
||||
}
|
||||
|
||||
function parsePhotos() {
|
||||
$('#data-container img.photo').each(function(){
|
||||
$(this).replaceWith($('<div>').addClass('photo rounded').css('background-image', 'url('+ $(this).attr('src') +')').width($(this).width()).height($(this).height()));
|
||||
})
|
||||
}
|
||||
|
||||
google.load('jquery', '1.4.4');
|
||||
google.setOnLoadCallback(powerhug);
|
||||
Reference in New Issue
Block a user