กองทัพบก มีสถาบันการศึกษา รร.หน่วย และเหล่าสายวิทยาการ รวม ๓๐ หน่วย
เว็บไซต์ของ รร.หน่วยและเหล่าสายวิทยาการของ ทบ.
โรงเรียนทหารราบศูนย์การทหารราบ โรงเรียนสุนัขทหาร ศูนย์การสุนัขทหาร กรมการสัตว์ทหารบก โรงเรียนทหารม้า ศูนย์การทหารม้า โรงเรียนทหารขนส่ง กรมการขนส่งทหารบกทหารบก
โรงเรียนทหารปืนใหญ่ ศูนย์การทหารปืนใหญ่ โรงเรียนทหารการสัตว์ กรมการสัตว์ทหารบก
โรงเรียนทหารช่าง กรมการทหารช่าง โรงเรียนทหารการเงิน กรมการเงินทหารบก โรงเรียนทหารสื่อสาร กรมการทหารสื่อสาร โรงเรียนทหารสารบรรณ กรมสารบรรณทหารบก โรงเรียนทหารสรรพาวุธ กรมสรรพาวุธทหารบก โรงเรียนการกำลังสำรอง ศูนย์การกำลังสำรอง โรงเรียนทหารสารวัตร กรมการสารวัตรทหารบก โรงเรียนการบินทหารบก
โรงเรียนดุริยางค์ทหารบก โรงเรียนสงครามพิเศษ ศูนย์สงครามพิเศษ
โรงเรียนข่าวทหารบก โรงเรียนทหารพลาธิการ กรมพลาธิการทหารบก โรงเรียนเสนารักษ์ กรมแพทย์ทหารบก โรงเรียนวิทยาศาสตร์ทหารบก โรงเรียนส่งกําลังบํารุงทหารบก ศภษ.ยศ.ทบ. โรงเรียนกิจการพลเรือนกรมกิจการพลเรือนทหารบก กอศจ.ยศ.ทบ.
เว็บไซต์ของสถาบันการศึกษาของ ทบ.
Website ที่เกี่ยวข้องนอกกองทัพบก
"); }); }); $(window).scroll(function(){ var winHeight = $(window).height(); var scrollTop = $(window).scrollTop(); var imgSet = $(".product-images"); var footerSet = $(".footerWrapper"); var sticky= $(".sticky.product-description").offset(); if (typeof sticky != 'undefined') { if (scrollTop >= sticky.top ){ if ( (imgSet.height() + imgSet.offset().top) - scrollTop > 350 && scrollTop > imgSet.offset().top) { $(".sticky.product-description").css("position","fixed"); $(".sticky.product-description").css("top","0"); }else{ $(".sticky.product-description").css("position","relative"); $(".sticky.product-description").css("top","initial"); } }else{ $(".sticky.product-description").css("position","relative"); $(".sticky.product-description").css("top","initial"); } } }); //$("#page").hi{de(); $("body").fadeIn(500); //$('img').imgPreload() //$(".cart-tab").css("top",$("ul.menubar").offset().top + $("ul.menubar").height()+20); //$(".menu-tab").css("top",$("ul.menubar").offset().top + $("ul.menubar").height()+100); var $images = $('img'); $('header').each(function(){ var el = $(this), sources, image; if(sources = el.css('background-image')){ $.each(sources.split(','), function(i, source){ if(image = source.match(/url\((['"])?(.*?)\1\)/)){ $images = $images.add($(' ').attr('src', image.pop())); } }); } }); $('div').each(function(){ var el = $(this), sources, image; if(sources = el.css('background-image')){ $.each(sources.split(','), function(i, source){ if(image = source.match(/url\((['"])?(.*?)\1\)/)){ $images = $images.add($(' ').attr('src', image.pop())); } }); } }); $images.imagesLoaded().progress(function(instance, image){ var result = image.isLoaded ? 'loaded' : 'broken'; //console.log('Image:', result, image.img.src); //$(image.img).fadeIn(1000); }); $fotorama = $('.product-detail .fotorama'); $fotorama.on('fotorama:fullscreenenter', function (e, fotorama, extra) { fotorama.setOptions({ fit: 'contain' }); }); $fotorama.on('fotorama:fullscreenexit', function (e, fotorama, extra) { fotorama.setOptions({ fit: 'contain' }); }); $(".productsgalleryCover .container.product-gallery").removeClass("container").addClass("container-fluid"); $(".productsgalleryCover").closest("#products_gallery").find("div.container-fluid:first").css("padding",""); $(".addtocart2").off("click").on("click",function() { // console.log($(this).closest('.product-detail').attr("id")); $("#cartModal").modal('show'); }); $('#datetimepicker1').datetimepicker({ useCurrent: true, format: 'HH:mm' }); $("#datetimepicker1").click(function() { $(this).find(".bootstrap-datetimepicker-widget.dropdown-menu").css("opacity","1"); $(this).find(".bootstrap-datetimepicker-widget.dropdown-menu").css("visibility","visible"); }); $('#datetimepicker2').datetimepicker({ locale: 'th', format: 'YYYY-MM-DD' }); $("#datetimepicker2").click(function() { $(this).find(".bootstrap-datetimepicker-widget.dropdown-menu").css("opacity","1"); $(this).find(".bootstrap-datetimepicker-widget.dropdown-menu").css("visibility","visible"); }); $(".mPayment_temp").off("click").on("click", function() { $("#paymentNoticeModal").modal(); $('#datetimepicker1').datetimepicker({ useCurrent: true, format: 'HH:mm' }); $('#datetimepicker2').datetimepicker({ locale: 'th', format: 'YYYY-MM-DD' }); }); }); /* $('.tree-toggle').click(function () {	$(this).parent().children('ul.tree').toggle(200); }); $(function(){ $('.tree-toggle').parent().children('ul.tree').toggle(200); }) */ $(document).on("click",".m_expande",function(e){ //if ($(this).data("target")) var tid = $(this).data("target"); var self = $(this); /* console.log($(tid).hasClass("collapse")); console.log(tid); console.log($(tid + ".collapsing").hasClass("in")); return false; */ $(tid).on('shown.bs.collapse hidden.bs.collapse',function (e) { if (e.type == 'shown') { // console.log('ok'); $(self).html(" "); //$(this).closest('.panel').css('background-color', 'pink') return false; } else if (e.type == 'hidden') { //console.log('no'); $(self).html(" "); //$(this).closest('.panel').css('background-color', '#fff') return false; } }) }); $(document).on("click",".acategory",function(){ var id =$(this).data("id"); var stateObj = {cid:id}; var stateTitle = ""; if (parseInt(id) >0) { history.pushState(stateObj, stateTitle, "http://qed-army.com//PJoHU" + "?cid="+id); // window.location.href ="http://qed-army.com//PJoHU" + "?cid="+id; }else{ history.pushState(stateObj, stateTitle, "http://qed-army.com//PJoHU"); // window.location.href =""; } show_product(id,$(this)); return false; }); function show_product(cat_id,el) { var c_align = $(el).closest(".productsgalleryCover").attr('data-align'); var p_name_v	= $(el).closest(".productsgalleryCover").attr('data-namevisible'); var p_price_v = $(el).closest(".productsgalleryCover").attr('data-pricevisible'); var p_detail_v = $(el).closest(".productsgalleryCover").attr('data-detailvisible'); var p_addtocart_v = $(el).closest(".productsgalleryCover").attr('data-addtocartvisible'); var p_rows = $(el).closest(".productsgalleryCover").attr('data-rows'); var p_cols = $(el).closest(".productsgalleryCover").attr('data-cols'); var p_padding = $(el).closest(".productsgalleryCover").attr('data-padding'); var p_margin = $(el).closest(".productsgalleryCover").attr('data-margin'); var hasCat = $(el).closest(".productsgalleryCover").find(".categorys_column").html(); var p_img_style	= $(el).closest(".productsgalleryCover").attr('data-imagestyle'); if (typeof c_align == 'undefined') { c_align='left'; } if (typeof p_name_v == 'undefined') { p_name_v='1'; } if (typeof p_price_v == 'undefined') { p_price_v='1'; } if (typeof p_detail_v == 'undefined') { p_detail_v='1'; } if (typeof p_addtocart_v == 'undefined') { p_addtocart_v='0'; } if (typeof p_rows == 'undefined') { p_rows='5'; } if (typeof p_cols == 'undefined') { if (typeof hasCat == 'undefined') { p_cols='4'; }else{ p_cols='3'; } } if (typeof p_padding == 'undefined') { p_padding='1'; } if (typeof p_margin == 'undefined') { p_margin='1'; } if (typeof p_img_style == 'undefined') { p_img_style = 'horizontal'; } var data = { cat_id: cat_id, c_align: c_align, p_name_v: p_name_v, p_price_v: p_price_v, p_detail_v:p_detail_v, p_addtocart_v:p_addtocart_v, p_rows: p_rows, p_cols: p_cols, p_padding: p_padding, p_margin:p_margin, hasCat: hasCat, p_img_style: p_img_style }; $.ajax({ url : 'http://qed-army.com/get_products', type : "post", data :data, dataType : "json", beforeSend: function() { $(el).closest(".productsgalleryCover").find(".category_name_title").hide();; $(el).closest(".productsgalleryCover").find(".product-gallery").hide(); } }).done(function(data) { // console.log(data); $(el).closest(".productsgalleryCover").find(".category_name_title").html(' '+data.category_name).fadeIn(500); $(el).closest(".productsgalleryCover").find(".product-gallery").html(data.html).fadeIn(500); initCustomization($('.product-detail')); }).fail(function(jqXHR, textStatus, errorThrown) { console.log('error'); }); } $(document).on("click",".product-detail .caption .name",function(){ var pro_id = $(this).closest('.product-detail ').attr("id"); var name = $(this).closest('.product-detail').find(".name").text(); window.location.href = 'http://qed-army.com/product/' + pro_id.replace("pro_id_","") ; }); $(document).on("click",".cart-items .product-detail .name",function(){ var pro_id = $(this).closest('.product-detail ').attr("id"); var name = $(this).closest('.product-detail').find(".name").text(); window.location.href = 'http://qed-army.com/product/' + pro_id.replace("pro_id_","") ; }); $('.addtocart00').on('click', function () { var cart = $('.shopping-cart'); var imgtodrag = $(this).closest('.product-detail ').find("img").eq(0); if (imgtodrag) { var imgclone = imgtodrag.clone() .offset({ top: imgtodrag.offset().top, left: imgtodrag.offset().left }) .css({ 'opacity': '0.5', 'position': 'absolute', 'height': '150px', 'width': '150px', 'z-index': '100' }) .appendTo($('body')) .animate({ 'top': cart.offset().top + 10, 'left': cart.offset().left + 10, 'width': 75, 'height': 75 }, 1000, 'easeInOutExpo'); cart.addClass('items-added') updateCart(); setTimeout(function () { cart.effect("shake", { times: 2 }, 200); }, 1500); imgclone.animate({ 'width': 0, 'height': 0 }, function () { $(this).detach() }); } return false; }); var productCustomization = $('.product-detail'), cart = $('.shopping-cart'), //cart = $('.cart-tab .contents'), animating = false; jQuery(document).ready(function(){ //$(".productsgalleryCover .product-gallery").hide(); initCustomization(productCustomization); $(".cart-tab").on({ mouseenter: function () { //stuff to do on mouse enter // console.log('mouseenter'); //$("body").css("overflow","hidden"); }, mouseleave: function () { //stuff to do on mouse leave // console.log('mouseleave'); // $("body").css("overflow",""); $(".cart .cart-items") } }); $.each( $(".productsgalleryCover"), function( key, value ) { //console.log( key + ": " + value ); $(this).hide(); var self = $(this); var cat_id = getParameterByName('cid'); if (typeof cat_id == 'undefined') { if (typeof $(this).data("catagory") == 'undefined') { cat_id= 0; }else{ cat_id = $(this).data("catagory"); } } if (typeof cat_id == 'undefined') { cat_id= 0; } var c_category = $(this).attr('data-catagory'); var c_align = $(this).attr('data-align'); var p_name_v	= $(this).attr('data-namevisible'); var p_price_v = $(this).attr('data-pricevisible'); var p_detail_v = $(this).attr('data-detailvisible'); var p_addtocart_v = $(this).attr('data-addtocartvisible'); var p_rows = $(this).attr('data-rows'); var p_cols = $(this).attr('data-cols'); var p_padding = $(this).attr('data-padding'); var p_margin = $(this).attr('data-margin'); var hasCat = $(this).find(".categorys_column").html(); var p_img_style	= $(this).attr('data-imagestyle'); if (typeof $(this).find(".categorys_column").html() != 'undefined') { $.ajax({ url : 'http://qed-army.com/get_categorys', type : "post", data :{cat_id:cat_id}, dataType : "html", beforeSend: function() { $(".productsgalleryCover .categorys_column").html("") } }).done(function(data) { // console.log(data); $(".productsgalleryCover .categorys_column").html(data).fadeIn(500); $(".productsgalleryCover .categorys_column").addClass("col-xs-12"); $(".productsgalleryCover .col-md-9").addClass("product_column").addClass("col-xs-12"); $("#btn_find_product").on("click",function() { var var_text = $("input[name=txtq]").val(); if (typeof c_align == 'undefined') { c_align='left'; } if (typeof p_name_v == 'undefined') { p_name_v='1'; } if (typeof p_price_v == 'undefined') { p_price_v='1'; } if (typeof p_detail_v == 'undefined') { p_detail_v='1'; } if (typeof p_addtocart_v == 'undefined') { p_addtocart_v='0'; } if (typeof p_rows == 'undefined') { p_rows='5'; } if (typeof p_cols == 'undefined') { if (typeof hasCat == 'undefined') { p_cols='4'; }else{ p_cols='3'; } } if (typeof p_padding == 'undefined') { p_padding='1'; } if (typeof p_margin == 'undefined') { p_margin='1'; } if (typeof c_category != 'undefined') { cat_id=c_category; } if (typeof p_img_style == 'undefined') { p_img_style = 'horizontal'; } var data = { cat_id: cat_id, c_align: c_align, p_name_v: p_name_v, p_price_v: p_price_v, p_detail_v:p_detail_v, p_addtocart_v:p_addtocart_v, p_rows: p_rows, p_cols: p_cols, p_padding: p_padding, p_margin:p_margin, hasCat: hasCat, p_img_style: p_img_style, keyword:var_text }; $.ajax({ url : 'http://qed-army.com/get_products', type : "post", data :data, dataType : "json", beforeSend: function() { self.find(".product-gallery").html("") } }).done(function(data) { // console.log(data); self.find(".category_name_title").html(' '+data.category_name).fadeIn(500); self.find(".product-gallery").html(data.html).fadeIn(500); self.css("display","block"); var productCustomization = $('.product-detail'); initCustomization(productCustomization); //$(".productsgalleryCover").fadeIn(500); }).fail(function(jqXHR, textStatus, errorThrown) { console.log('error'); }); }); self.fadeIn(500); }).fail(function(jqXHR, textStatus, errorThrown) { console.log('error'); }); } if (typeof c_align == 'undefined') { c_align='left'; } if (typeof p_name_v == 'undefined') { p_name_v='1'; } if (typeof p_price_v == 'undefined') { p_price_v='1'; } if (typeof p_detail_v == 'undefined') { p_detail_v='1'; } if (typeof p_addtocart_v == 'undefined') { p_addtocart_v='0'; } if (typeof p_rows == 'undefined') { p_rows='5'; } if (typeof p_cols == 'undefined') { if (typeof hasCat == 'undefined') { p_cols='4'; }else{ p_cols='3'; } } if (typeof p_padding == 'undefined') { p_padding='1'; } if (typeof p_margin == 'undefined') { p_margin='1'; } if (typeof c_category != 'undefined') { cat_id=c_category; } if (typeof p_img_style == 'undefined') { p_img_style = 'horizontal'; } var data = { cat_id: cat_id, c_align: c_align, p_name_v: p_name_v, p_price_v: p_price_v, p_detail_v:p_detail_v, p_addtocart_v:p_addtocart_v, p_rows: p_rows, p_cols: p_cols, p_padding: p_padding, p_margin:p_margin, hasCat: hasCat, p_img_style: p_img_style }; $.ajax({ url : 'http://qed-army.com/get_products', type : "post", data :data, dataType : "json", beforeSend: function() { self.find(".product-gallery").html("") } }).done(function(data) { // console.log(data); self.find(".category_name_title").html(' '+data.category_name).fadeIn(500); self.find(".product-gallery").html(data.html).fadeIn(500); self.css("display","block"); var productCustomization = $('.product-detail'); initCustomization(productCustomization); //$(".productsgalleryCover").fadeIn(500); }).fail(function(jqXHR, textStatus, errorThrown) { console.log('error'); }); }); $('body').on('click', function(event){ //if user clicks outside the .cd-gallery list items - remove the .hover class and close the open ul.size/ul.color list elements if( $(event.target).is('body') || $(event.target).is('.cd-gallery') ) { deactivateCustomization(); } }); cart.on('click', function() { $(".shoppingCartModal").modal("show"); var pro_id = $(this).closest('.product-detail ').attr("id"); $.ajax({ url : 'http://qed-army.com/get_cart', type : "post", data :{id:pro_id}, dataType : "json" }).done(function(data) { // console.log(data); $(".shoppingCartModal .modal-body").html(data.list); }).fail(function(jqXHR, textStatus, errorThrown) { console.log('error'); }); $(".shoppingCartModal").on("shown.bs.modal",function(){ console.log('shown'); $(".shoppingCartModal .itemDelete").off("click").on("click",function() { var id = $(this).attr("id"); var self = $(this); $.ajax({ url : 'http://qed-army.com/removecart', type : "post", data :{id:id}, dataType : "json" }).done(function(data) { //console.log('data'); if (data.msg == 'ok') { $("#r_"+id).remove(); $("a.shopping-cart > span").html("0"); // self.closest("tr").reomove(); } // console.log(data); }).fail(function(jqXHR, textStatus, errorThrown) { console.log('error'); }); }); }); $(".shoppingCartModal").on("hide.bs.modal",function(){ console.log('hidden'); }); }); }); function initCustomization(items) { items.each(function(){ var actual = $(this), selectOptions = actual.find('[data-type="select"]'), addToCartBtn = actual.find('.addtocart'), touchSettings = actual.next('.cd-customization-trigger'); //detect click on ul.size/ul.color list elements selectOptions.on('click', function(event) { var selected = $(this); //open/close options list selected.toggleClass('is-open'); resetCustomization(selected); if($(event.target).is('li')) { // update selected option var activeItem = $(event.target), index = activeItem.index() + 1; activeItem.addClass('active').siblings().removeClass('active'); selected.removeClass('selected-1 selected-2 selected-3').addClass('selected-'+index); // if color has been changed, update the visible product image selected.hasClass('color') && updateSlider(selected, index-1); } }); //detect click on the add-to-cart button addToCartBtn.on('click', function() { //$(document).on("click",addToCartBtn,function(){ var imgtodrag = $(this).closest('.product-detail').find(".fotorama__stage__frame.fotorama__active img").eq(0); var imgtodragoffset = $(this).closest('.product-detail').find(".fotorama__stage__frame.fotorama__active").eq(0); var pro_id = $(this).closest('.product-detail').attr("id"); var imgTmp = $(' '); //Equivalent: $(document.createElement('img')) imgTmp.attr('src', imgtodrag.attr("src")); imgTmp.appendTo('body'); if (typeof imgtodrag.offset() == 'undefined') { imgtodrag = $(this).closest('.product-detail').find(".quick-item-link").eq(0); imgtodragoffset = $(this).closest('.product-detail').find(".quick-item-link").eq(0); var bg = $(this).closest('.product-detail').find("img").eq(0).css('background-image'); bg = bg.replace('url(','').replace(')','').replace(/\"/gi, ""); imgTmp.attr("src",bg); } if (imgtodrag) { var imgclone = imgTmp.clone() .offset({ top: imgtodragoffset.offset().top, left: imgtodragoffset.offset().left //+ ((imgtodrag.width()-imgtodragoffset.width())/2) }) .css({ 'opacity': '0.5', 'position': 'absolute', // 'height': '150px', //'width': '150px', 'height': imgtodragoffset.height(), 'width': imgtodragoffset.width(), 'z-index': '100' }) .appendTo($('body')) .animate({ 'top': cart.offset().top + 10, 'left': cart.offset().left + 10, 'width': 75, 'height': 75 }, 1000, 'easeInOutExpo'); setTimeout(function () { cart.effect("shake", { times: 2 }, 200); }, 1500); imgclone.animate({ 'width': 0, 'height': 0 }, function () { $(this).detach(); imgTmp.remove(); }); } if(!animating) { //animate if not already animating animating = true; resetCustomization(addToCartBtn); addToCartBtn.addClass('is-added').eq(0).animate({ //draw the check icon 'stroke-dashoffset':0 }, 300, function(){ setTimeout(function(){ updateCart(pro_id,'add',1); //	addToCartBtn.removeClass('is-added').find('em').on('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){ //wait for the end of the transition to reset the check icon //	addToCartBtn.eq(0).css('stroke-dashoffset', '19.79'); animating = false; //	}); if( $('.no-csstransitions').length > 0 ) { // check if browser doesn't support css transitions addToCartBtn.eq(0).css('stroke-dashoffset', '19.79'); animating = false; // console.log('b'); } }, 600); }); } return false; }); //detect click on the settings icon - touch devices only touchSettings.on('click', function(event){ event.preventDefault(); resetCustomization(addToCartBtn); }); }); } function updateSlider(actual, index) { var slider = actual.parent('.cd-customization').prev('a').children('.cd-slider-wrapper'), slides = slider.children('li'); slides.eq(index).removeClass('move-left').addClass('selected').prevAll().removeClass('selected').addClass('move-left').end().nextAll().removeClass('selected move-left'); } function resetCustomization(selectOptions) { //close ul.clor/ul.size if they were left open and user is not interacting with them anymore //remove the .hover class from items if user is interacting with a different one selectOptions.siblings('[data-type="select"]').removeClass('is-open').end().parents('.cd-single-item').addClass('hover').parent('li').siblings('li').find('.cd-single-item').removeClass('hover').end().find('[data-type="select"]').removeClass('is-open'); } function deactivateCustomization() { productCustomization.parent('.cd-single-item').removeClass('hover').end().find('[data-type="select"]').removeClass('is-open'); } function updateCart(id,type,amount) { //show counter if this is the first item added to the cart ( !cart.hasClass('items-added') ) && cart.addClass('items-added'); var cartItems = cart.find('span'), text = parseInt(cartItems.text()) + 1; cartItems.text(text); $.ajax({ url : 'http://qed-army.com/add_to_cart', type : "post", data :{id:id}, dataType : "json" }).done(function(data) { // console.log(data); $(".cart-tab .cart-link .amount .item_total").html(data.item_sub_total); $(".cart-tab .cart-link .item_num").html(data.item_num); $(".cart-tab .cart-link .item_quantity").html(data.item_quantity); $(".cart-tab .cart .cart-items ul").html(data.produt_content); }).fail(function(jqXHR, textStatus, errorThrown) { console.log('error'); }); } function flyToElement(flyer, flyingTo) { var $func = $(this); var divider = 3; var flyerClone = $(flyer).clone(); $(flyerClone).css({position: 'absolute', top: $(flyer).offset().top + "px", left: $(flyer).offset().left + "px", opacity: 1, 'z-index': 1000}); $('body').append($(flyerClone)); var gotoX = $(flyingTo).offset().left + ($(flyingTo).width() / 2) - ($(flyer).width()/divider)/2; var gotoY = $(flyingTo).offset().top + ($(flyingTo).height() / 2) - ($(flyer).height()/divider)/2; $(flyerClone).animate({ opacity: 0.4, left: gotoX, top: gotoY, width: $(flyer).width()/divider, height: $(flyer).height()/divider }, 700, function () { $(flyingTo).fadeOut('fast', function () { $(flyingTo).fadeIn('fast', function () { $(flyerClone).fadeOut('fast', function () { $(flyerClone).remove(); }); }); }); }); }