Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Web-Comic-Reader
Commits
fe077ac0
Commit
fe077ac0
authored
Apr 21, 2017
by
afzafri
Browse files
remove init gallery button, init gallery when image is clicked
parent
57ec414e
Changes
2
Hide whitespace changes
Inline
Side-by-side
assets/js/script.js
View file @
fe077ac0
...
...
@@ -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>
"
);
});
}
...
...
index.html
View file @
fe077ac0
...
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment