Files
vobao/public/scripts/Vobao/new.js
toom1996 e2fa2c4378 update
2025-08-04 11:04:37 +08:00

77 lines
2.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function changearea(url, divid, isDefaultArea) { //原本还有个selareaid参数
var postStr = "";
// $.ajax({
// type: "POST",
// contentType: "application/x-www-form-urlencoded",
// url: url,
// data: postStr,
// error: function () {
// alert("您所请求的页面有异常,请刷新重试。");
// },
// success: function (msg) {
// if (msg === "") {
// $("#" + divid).html("没有结果");
// }
// else {
// $("#" + divid).html(msg);
// if (divid === "areaid2") {
// $("#areaid3").html("<option value='0'>全部</option>");
// }
// //$("#" + divid).val(selareaid);
// }
// if (isDefaultArea) {
// var defaultAreaID = $('#txtDefaultAreaID').val();
// $('#Area1List1').val(defaultAreaID);
// $('#Area2List2').val(defaultAreaID);
// }
// }
// });
}
$(document).ready(function () {
//首页热销产品切换
$("[tab]").click(function () {
$("[tab]").removeClass("active");
$("[tab]").eq($(this).index()).addClass("active");
$(this).parents().parents().find(".div1,.div2").hide();
$(this).parents().parents().find("." + $(this).attr("tab")).show();
});
// 导航下拉
$(".ndown").hover(function () {
$(".navchild").show();
$(this).addClass("active");
}, function () {
$(".navchild").hide();
$(this).removeClass("active");
});
//地址切换
$(".area").click(function () {
$(".setcity").show();
});
$(".sbut2 ").click(function () {
$(".setcity").hide();
});
$(".p_tab li").hover(function() {
$(".p_tab li").removeClass("active").eq($(this).index()).addClass("active");
$(".p_link").removeClass("show").eq($(this).index()).addClass("show");
});
$('.select-city').on('click', function (e) {
$('.city-bg').removeClass('none');
});
$('.city-close').on('click', function (e) {
$("#citySeachKey").val("");
$("#citypop-tip-no").hide();
$('.city-bg').addClass('none');
});
});