1/* START fix-top menu */ 2var win = $(window).width(); 3var head_h = $("#header").height(); 4if (win < '767') { 5 6 var footer_mobile = $(".footer3").height(); 7 $("#footer").css({"margin-bottom": footer_mobile + "px"}); 8 $("#header").removeClass("navbar-fixed-top"); 9 $("#menu_list .dropdown-menu").removeClass("dropdown-content"); 10} else { 11 $("#body").css({"margin-top": head_h + "px"}); 12 $("#menu_list .dropdown-menu").addClass("dropdown-content"); 13} 14/* END fix-top menu */ 15 16/* START link à¹à¸à¸·à¹à¸à¸«à¸²à¹à¸à¸«à¸à¹à¸²à¹à¸à¸µà¸¢à¸§à¸à¸±à¸ */ 17$(".card ul li a").click(function () { 18 var warp = $(this).attr('data-link'); 19 var height = $("#" + warp).offset().top; 20 var heightzoom = height - head_h; 21 if (win < '767') { 22 $('html,body').animate({scrollTop: height + 'px'}, 750); 23 } else { 24 $('html,body').animate({scrollTop: heightzoom + 'px'}, 750); 25 } 26}); 27/* END link à¹à¸à¸·à¹à¸à¸«à¸²à¹à¸à¸«à¸à¹à¸²à¹à¸à¸µà¸¢à¸§à¸à¸±à¸ */ 28 29/* START à¸à¸¸à¹à¸¡à¸à¸à¸à¸¶à¹à¸à¹à¸à¸à¹à¸²à¸à¸à¸ */ 30$(".gototop").hide(); 31$(window).scroll(function () { 32 if ($(window).scrollTop() < $(window).height()) { 33 $(".gototop").hide("slow"); 34 } else { 35 $(".gototop").show("slow"); 36 } 37}); 38$(".gototop").click(function () { 39 $('html, body').animate({scrollTop: '0px'}, 750); 40}); 41$(".logoutgg").click(function () { 42 signOut(); 43}); 44 45$(".cat1_menu").click(function () { 46 var wd = $(".menu_back").width(); 47 if (wd == 0) { 48 wd = $(".click_all").innerWidth(); 49 } 50 var id = $(this).data("id"); 51 var dis = $(".panelmenu").css('display'); 52 if (dis == "block") { 53 var source = $(".panelmenu").attr("data-source"); 54 if (source == id) { 55 $("#cat_main_" + id + " a.cat1_title").removeClass("active"); 56 $(".panelmenu").hide(); 57 $(".panelmenu").removeClass('nochange'); 58 } else { 59 $("#cat_main_" + source + " a.cat1_title").removeClass("active"); 60 $("#cat_main_" + id + " a.cat1_title").addClass("active"); 61 $(".panelmenu").attr("data-source", id); 62 $(".panelmenu").css('left', wd); 63 $(".panelmenu").addClass('nochange'); 64 $(".panelmenu").show(); 65 show_submenu(id); 66 } 67 } else { 68 $(".panelmenu").css('left', wd); 69 $(".panelmenu").attr("data-source", id); 70 $(".panelmenu").addClass('nochange'); 71 $(".panelmenu").show(); 72 show_submenu(id); 73 } 74}); 75$(".cat1_menu").mouseover(function () { 76 var wd = $(".menu_back").width(); 77 if (wd == 0) { 78 wd = $(".click_all").innerWidth(); 79 } 80 var id = $(this).data("id"); 81 $('.cat1_title').removeClass('active'); 82 $(this).addClass('active'); 83 var dis = $(".panelmenu").css('display'); 84 if (dis == "none") { 85 $(".panelmenu").css('left', wd); 86 $(".panelmenu").show(); 87 show_submenu(id); 88 } else { 89 var ch_ch = $(".panelmenu").hasClass('nochange'); 90 if (ch_ch == false) { 91 $(".panelmenu").css('left', wd); 92 $(".panelmenu").show(); 93 show_submenu(id); 94 } 95 } 96}); 97 98$(".menu_back").on("mouseenter", function () { 99 $(".panelmenu").show(); 100}); 101 102$(document).on("click", ".img360", function () { 103 var id = $(this).attr('data-id'); 104 var code = $(this).attr('data-code').toString(); 105 106 $.ajax({ 107 type: "POST", 108 url: base_url + 'product/product_view_360_log', 109 data: {id: id, code: code}, 110 success: function (data) { 111 112 } 113 }); 114 115 var img360 = ''; 116 img360 += ' <div class="row">'; 117 img360 += ' <div class="col-md-12">'; 118 img360 += '<span class=" pull-right" type="button" data-dismiss="modal" aria-label="Close" style="position: absolute; top: 0; right: 15px; z-index:11"><i class="fa fa-times fa-2x" style="cursor: pointer;"></i></span>'; 119 img360 += '<div id="presentation1-container"></div>'; 120 img360 += ' </div> <div class="claerfix"></div></div>'; 121 122 $("#imgcover360 .modal-body").html(img360); 123 124 $('#imgcover360').modal(); 125 $("#imgcover360 .modal-dialog").css({'width': '100%', 'max-width': '1000px', 'padding': '0'}); 126 $(function () { 127 inject_orbitvu( 128 'presentation1-container', 129 base_url + 'assets/orbitvu/orbitvuer12.swf', 130 base_url + 'assets/orbitvu/expressInstall.swf', 131 { 132 ovus_folder: "https://media1.jib.co.th/360/" + code.replace(/(#|[/])/g, '-'), 133 content2: "yes", 134 width: "auto", 135 height: "500", 136 }); 137 }); 138}); 139 140$(document).on("click", ".cart_modal", function () { 141//$('.cart_modal').on('click', function () { 142 var pro_id = $(this).data('id'); 143 var qty = $(this).attr('data-qty'); 144 var qtyget = 1; 145 if (qty) { 146 qtyget = qty 147 } 148 var pro_type = $(this).data('type'); 149 if (pro_type == 2) { 150 var array_pro = pro_id.split(','); 151 $.each(array_pro, function (key, value) { 152 $.ajax({ 153 type: "GET", 154 url: base_url + 'cart/check_loop/' + value + '/' + qtyget + '/3', 155 dataType: "json", 156 success: function (data) { 157 if (data.status == false) { 158 $('#modal_cart_reply .title').html(data.message.title); 159 $('#modal_cart_reply .detail').html(data.message.detail); 160 $('#modal_cart_reply').modal('show'); 161 } else { 162 $('.cart .badge').html(data.result.qty); 163 $("#modal_cart .modal-content").load(base_url + 'cart/cart_modal/' + data.code); 164 $('#modal_cart .modal-dialog').removeClass('modal-lg').removeClass('modal-sm'); 165 $('#modal_cart .modal-dialog').addClass('modal-lg'); 166 $('#modal_cart').modal('show'); 167 } 168 } 169 }); 170 }); 171 172 } else { 173 $.ajax({ 174 type: "GET", 175 url: base_url + 'cart/check_loop/' + pro_id + '/' + qtyget + '/3', 176 dataType: "json", 177 success: function (data) { 178 if (data.status == false) { 179 $('#modal_cart_reply .title').html(data.message.title); 180 $('#modal_cart_reply .detail').html(data.message.detail); 181 $('#modal_cart_reply').modal('show'); 182 } else { 183 $('.cart .badge').html(data.result.qty); 184 $("#modal_cart .modal-content").load(base_url + 'cart/cart_modal/' + data.code); 185 $('#modal_cart .modal-dialog').removeClass('modal-lg').removeClass('modal-sm'); 186 $('#modal_cart .modal-dialog').addClass('modal-lg'); 187 $('#modal_cart').modal('show'); 188 } 189 } 190 }); 191 } 192}); 193 194$(".btn_compare").click(function (event) { 195 var com_this = $(this); 196 var pro_id = $(this).data('id'); 197 var pro_cate = $(this).data('cate'); 198 var pro_level = $(this).data('level'); 199 200 $.ajax({ 201 type: "GET", 202 url: base_url + "pricelist/compare/" + pro_id + "/" + pro_cate + "/" + pro_level, 203 dataType: "json", 204 success: function (data) { 205 if (data == false) { 206 /*à¹à¸à¹à¸à¹à¸à¸·à¸à¸à¸à¸à¸à¸£à¸°à¹à¸ à¸*/ 207 $("#modal_cart .modal-content").load(base_url + 'pricelist/pricelist_modal/' + pro_id + '/' + pro_cate + '/' + pro_level + '/1'); 208 $('#modal_cart .modal-dialog').removeClass('modal-lg').removeClass('modal-sm'); 209 $('#modal_cart').modal('show'); 210 } else if (data == 'max') { 211 /*à¹à¸à¹à¸à¹à¸à¸·à¸à¸à¹à¸à¹à¸¡à¸à¸³à¸à¸§à¸à¹à¸à¸£à¸µà¸¢à¸à¹à¸à¸µà¸¢à¸*/ 212 $("#modal_cart .modal-content").load(base_url + 'pricelist/pricelist_modal/' + pro_id + '/' + pro_cate + '/' + pro_level + '/2'); 213 $('#modal_cart .modal-dialog').removeClass('modal-lg').removeClass('modal-sm'); 214 $('#modal_cart .modal-dialog').addClass('modal-sm'); 215 $('#modal_cart').modal('show'); 216 } else { 217 $(".badge_compare").load(base_url + "pricelist/check_product"); 218 var but = com_this.find('a'); 219 but.addClass('active'); 220 $('.gotocompare').removeClass('hidden'); 221 $('#modal_cart').modal('hide'); 222 } 223 } 224 }); 225}); 226 227$(".qty_pro").keydown(function (e) { 228 if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 || (e.keyCode === 65 && (e.ctrlKey === true || e.metaKey === true)) || 229 (e.keyCode >= 35 && e.keyCode <= 40)) { 230 231 return; 232 } 233 if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) { 234 235 e.preventDefault(); 236 } 237 console.log(e); 238}); 239 240function show_submenu(id) { 241 var html = $("#cat_sub_" + id).html(); 242 $(".panelmenu").html(html); 243 244} 245function close_panel() { 246 $("a.cat1_title").removeClass("active"); 247 $(".panelmenu").attr("data-source", ""); 248 $(".panelmenu").removeClass('nochange'); 249 $(".panelmenu").hide(); 250} 251/* END à¸à¸¸à¹à¸¡à¸à¸à¸à¸¶à¹à¸à¹à¸à¸à¹à¸²à¸à¸à¸ */
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.