?
深圳市桥商贸有限公?/a>
地址Q深圛_龙岗区南湾街道南岭村C三角?号乌托邦园区422
邮编Q?18112
电话Q?755-25152556
传真Q?755-25152457
|址Q?a target="_blank" rel="nofollow">http://www.chordn.com
EmailQ?a href="mailto:sales@chordn.com">sales@chordn.com
本网站信息涉及广告内容!
var gory = $("#H_ProductCategoryList").val();
var obj = eval(gory);
$(function () {
$.each(obj, function (key, item) {
if (item.ParentID == "0") {
//如果是一U?判断是否有子?
var result = false;
$.each(obj, function (key, itemch) {
if (itemch.ParentID == item.CategoryID) {
result = true;
return;
}
})
if (result == false) {
$("#id_category_" + item.CategoryID).attr("style", "background-image:url('../Content/Foreground/image/zximg/ico_s1.gif')");
$("#id_category_" + item.CategoryID).unbind("click").removeClass("id_HideCateGory").removeClass("id_ShowCateGory");
}
}
})
})
//点击h1事g 展开
$(document).on("click", ".id_ShowCateGory", function () {
var $chi = "";
var pid = $(this).attr("data-id");
$.each(obj, function (key, item) {
if (item.ParentID == pid) {
var result = false;
$.each(obj, function (key, itemch) {
if (itemch.ParentID == item.CategoryID) {
result = true;
return;
}
})
if (result == false) {
$chi += "
";
if ($chi != "") {
$(this).parent().append($chi);
}
$(this).attr("style", "background-image:url('../Content/Foreground/image/zximg/ico_s1.gif')");
$(this).unbind("click").addClass("id_HideCateGory").removeClass("id_ShowCateGory");
})
$(document).on("click", ".id_HideCateGory", function () {
$(this).parent().find("ul").remove();
$(this).attr("style", "background-image:url('../Content/Foreground/image/zximg/ico_s2.gif')");
$(this).unbind("click").addClass("id_ShowCateGory").removeClass("id_HideCateGory");
})
//$(".id_HideCateGory").click(function () {
// $(this).parent().remove("li");
// $(this).attr("style", "background-image:url('../Content/Foreground/image/zximg/ico_s2.gif')");
// $(this).unbind("click").addClass("id_ShowCateGory").removeClass("id_HideCateGory");
//})