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
7d12243f
Commit
7d12243f
authored
Apr 21, 2017
by
afzafri
Browse files
re-bind the init gallery function everytime after opening new comic
parent
903eb524
Changes
1
Hide whitespace changes
Inline
Side-by-side
assets/js/script.js
View file @
7d12243f
...
...
@@ -3,15 +3,17 @@ $(document).ready(function(){
// Load all the archive formats
loadArchiveFormats
([
'
rar
'
,
'
zip
'
,
'
tar
'
]);
// init the gallery plugin, when there is a first click on a image
$
(
document
).
one
(
'
click
'
,
'
#comicImg
'
,
function
(){
event
.
preventDefault
();
// initialize gallery
$
(
'
#output
'
).
lightGallery
();
$
(
this
).
click
();
});
$
(
"
#fileup
"
).
change
(
function
(){
// init the gallery plugin, when there is a first click on a image
// re-bind this function when opening new comic
$
(
document
).
one
(
'
click
'
,
'
#comicImg
'
,
function
(){
event
.
preventDefault
();
// initialize gallery
$
(
'
#output
'
).
lightGallery
();
$
(
this
).
click
();
});
// show loading
$
(
'
.se-pre-con
'
).
fadeIn
(
'
slow
'
);
...
...
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