Commit 70d3644b by lmf

优化底部条款隐藏显示

parent 49049e5a
......@@ -10,25 +10,6 @@
<img loading="lazy" src="<?php echo $block->getViewFileUrl('images/goTop.png'); ?>">
</p>
<script>
require([
'jquery'
], function ($) {
//footer
$("h4").click(function () {
var dis = $(this).siblings("ul").css("display");
if (dis == "none"){
$(this).siblings("ul").css("display","block");
$(this).children("span").html('^')
}else{
$(this).siblings("ul").css("display","none");
$(this).children("span").html('>')
}
});
$(".page-header .actions.search-dropdown").click(function () {
$("#search_mini_form_input").toggle();
});
});
//go to top button show
window.onscroll = function (){
var top = document.getElementById("topBtn");
......@@ -38,7 +19,6 @@
top.style.display="none";
}
}
var userAgentInfo = navigator.userAgent;
var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");
var flag = true;
......@@ -46,6 +26,25 @@
if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; }
}
require(['jquery'],function ($){
//footer
$("h4").click(function () {
var dis = $(this).siblings("ul").css("display");
if (flag == false){
if (dis == "none"){
$(this).siblings("ul").css("display","block");
$(this).children("span").html('^')
}else{
$(this).siblings("ul").css("display","none");
$(this).children("span").html('>')
}
}
});
//top search
$(".page-header .actions.search-dropdown").click(function () {
$("#search_mini_form_input").toggle();
});
//go to top button click
$('#topBtn').click(function(){
document.body.scrollTop = 0;
......
Markdown is supported
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