Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
Ecsite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shoei.kanno
Ecsite
Commits
3b509ff3
Commit
3b509ff3
authored
Oct 22, 2020
by
shoei.kanno
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '発表後修正' into 'master'
アニメーション追加 See merge request
!78
parents
41f04d10
5218ddf4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
136 additions
and
9 deletions
+136
-9
style.css
src/main/resources/static/css/style.css
+1
-2
list.js
src/main/resources/static/js/list.js
+132
-5
index.html
src/main/resources/templates/index.html
+3
-2
No files found.
src/main/resources/static/css/style.css
View file @
3b509ff3
...
...
@@ -2060,4 +2060,4 @@ th, td {
/* top画面フッター */
#top-footer
{
margin-top
:
70px
;
}
\ No newline at end of file
}
src/main/resources/static/js/list.js
View file @
3b509ff3
...
...
@@ -139,14 +139,140 @@ $('.cartBtn').on('click', function(event){
//ユニーク機能
//$("#limitedListBox").css("display", "none");
//let count = 0;
//$("#secret").on("click", function() {
// count ++;
// if (count % 2 == 1) {
// $("#limitedListBox").css("display", "flex");
// } else {
// $("#limitedListBox").css("display", "none");
// }
//});
//アニメーション
var
fadeIn
=
function
(
element
,
time
,
callback
)
{
var
fadeTime
=
(
time
)
?
time
:
400
,
keyFrame
=
30
,
stepTime
=
fadeTime
/
keyFrame
,
maxOpacity
=
1
,
stepOpacity
=
maxOpacity
/
keyFrame
,
opacityValue
=
0
,
sId
=
''
;
if
(
!
element
)
return
;
if
(
element
.
getAttribute
(
'data-fade-stock-display'
)
!==
undefined
&&
element
.
getAttribute
(
'data-fade-stock-display'
)
!==
null
)
{
element
.
style
.
display
=
element
.
getAttribute
(
'data-fade-stock-display'
);
}
var
setOpacity
=
function
(
setNumber
)
{
if
(
'opacity'
in
element
.
style
)
{
element
.
style
.
opacity
=
setNumber
;
}
else
{
element
.
style
.
filter
=
'alpha(opacity='
+
(
setNumber
*
100
)
+
')'
;
if
(
navigator
.
userAgent
.
toLowerCase
().
match
(
/msie/
)
&&
!
window
.
opera
&&
!
element
.
currentStyle
.
hasLayout
)
{
element
.
style
.
zoom
=
1
;
}
}
};
if
(
!
callback
||
typeof
callback
!==
'function'
)
callback
=
function
()
{};
setOpacity
(
0
);
sId
=
setInterval
(
function
()
{
opacityValue
=
Number
((
opacityValue
+
stepOpacity
).
toFixed
(
12
));
if
(
opacityValue
>
maxOpacity
)
{
opacityValue
=
maxOpacity
;
clearInterval
(
sId
);
}
setOpacity
(
opacityValue
);
if
(
opacityValue
===
maxOpacity
)
callback
();
},
stepTime
);
return
element
;
};
/**
* Fade-Out
* @param {Element} element 適用する要素
* @param {Number} [time=400] 効果時間(ミリ秒で指定)
* @param {Function} [callback] 完了後のコールバック関数
*/
var
fadeOut
=
function
(
element
,
time
,
callback
)
{
var
fadeTime
=
(
time
)
?
time
:
400
,
keyFrame
=
30
,
stepTime
=
fadeTime
/
keyFrame
,
minOpacity
=
0
,
stepOpacity
=
1
/
keyFrame
,
opacityValue
=
1
,
sId
=
''
;
if
(
!
element
)
return
;
element
.
setAttribute
(
'data-fade-stock-display'
,
element
.
style
.
display
.
replace
(
'none'
,
''
));
var
setOpacity
=
function
(
setNumber
)
{
if
(
'opacity'
in
element
.
style
)
{
element
.
style
.
opacity
=
setNumber
;
}
else
{
element
.
style
.
filter
=
'alpha(opacity='
+
(
setNumber
*
100
)
+
')'
;
if
(
navigator
.
userAgent
.
toLowerCase
().
match
(
/msie/
)
&&
!
window
.
opera
&&
!
element
.
currentStyle
.
hasLayout
)
{
element
.
style
.
zoom
=
1
;
}
}
};
if
(
!
callback
||
typeof
callback
!==
'function'
)
callback
=
function
()
{};
setOpacity
(
1
);
sId
=
setInterval
(
function
()
{
opacityValue
=
Number
((
opacityValue
-
stepOpacity
).
toFixed
(
12
));
if
(
opacityValue
<
minOpacity
)
{
opacityValue
=
minOpacity
;
element
.
style
.
display
=
'none'
;
clearInterval
(
sId
);
}
setOpacity
(
opacityValue
);
if
(
opacityValue
===
minOpacity
)
callback
();
},
stepTime
);
return
element
;
};
$
(
"#limitedListBox"
).
css
(
"display"
,
"none"
);
let
sampleElmt
=
document
.
getElementById
(
'limitedListBox'
),
fadeInBtnElmt
=
document
.
getElementById
(
'secret'
),
fadeOutBtnElmt
=
document
.
getElementById
(
'secret'
);
let
count
=
0
;
$
(
"#secret"
).
on
(
"click"
,
function
()
{
fadeInBtnElmt
.
onclick
=
function
()
{
count
++
;
if
(
count
%
2
==
1
)
{
if
(
count
%
2
==
1
)
{
//フェードイン
$
(
"#limitedListBox"
).
css
(
"display"
,
"flex"
);
fadeIn
(
sampleElmt
,
1500
);
}
else
{
$
(
"#limitedListBox"
).
css
(
"display"
,
"none"
);
//フェードアウト
$
(
"#limitedListBox"
).
css
(
"display"
,
"flex"
);
fadeOut
(
sampleElmt
,
1500
);
}
});
};
\ No newline at end of file
src/main/resources/templates/index.html
View file @
3b509ff3
...
...
@@ -261,8 +261,9 @@
<script src="js/vendor/bootstrap.min.js" th:src="@{/js/vendor/bootstrap.min.js}"></script>
<script src="js/isotope.pkgd.min.js" th:src="@{/js/isotope.pkgd.min.js}"></script>
<script src="js/owl.carousel.min.js" th:src="@{/js/owl.carousel.min.js}"></script>
<script src="js/wow.min.js" th:src="@{/js/wow.min.js}"></script>
<script src="js/custom.js" th:src="@{/js/custom.js}"></script>-->
<script src="js/wow.min.js" th:src="@{/js/wow.min.js}"></script>-->
<script
src=
"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"
></script>
<script
src=
"js/custom.js"
th:src=
"@{/js/index.js}"
></script>
<script
src=
"https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity=
"sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin=
"anonymous"
></script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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