Commit 61e321d5 authored by fred's avatar fred
Browse files

also run gallery js code on ajax page load

parent 81c704ce
......@@ -506,6 +506,17 @@ $(function() {
$('<a id="panikdb" href="http://panikdb.radiopanik.org' + panikdb_path + '">Voir dans PanikDB</a>').appendTo($main);
}
}
$('.gallery').each(function() {
var $gallery = $(this);
$gallery.find('span').on('click', function() {
$gallery.find('div.first img').attr('src', $(this).data('image-large'));
$gallery.find('div.first').show('fade');
return false;
});
$gallery.find('div.first').on('click', function() { $(this).toggle('fade'); return false; });
});
}
init();
......@@ -532,14 +543,4 @@ $(function() {
$waveform.find('span.done:last').addClass('current');
});
$('.gallery').each(function() {
var $gallery = $(this);
$gallery.find('span').on('click', function() {
$gallery.find('div.first img').attr('src', $(this).data('image-large'));
$gallery.find('div.first').show('fade');
return false;
});
$gallery.find('div.first').on('click', function() { $(this).toggle('fade'); return false; });
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment