Commit fe077ac0 authored by afzafri's avatar afzafri
Browse files

remove init gallery button, init gallery when image is clicked

parent 57ec414e
......@@ -3,10 +3,10 @@ $(document).ready(function(){
// Load all the archive formats
loadArchiveFormats(['rar', 'zip', 'tar']);
$('#initgal').click(function(){
$(document).on('click','#comicImg',function(){
event.preventDefault();
// initialize gallery
$('#output').lightGallery();
alert("Gallery initialized");
$('#output').lightGallery();
});
$("#fileup").change(function(){
......@@ -109,7 +109,7 @@ $(document).ready(function(){
var url = URL.createObjectURL(blob);
// output the images
$('#output').append("<a href='"+url+"'><img src='"+url+"' class='imgUrl'/></a>");
$('#output').append("<a href='"+url+"' id='comicImg'><img src='"+url+"' class='imgUrl'/></a>");
});
}
......
......@@ -13,7 +13,6 @@
<input type="file" name="fileup" id="fileup">
<button id="btnFullscreen">Fullscreen</button>
<br><br>
<button id="initgal">Init gallery</button>
<center>
<div id="output"></div>
</center>
......
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