// axios // axios.get('http://172.105.205.52:8000/courses?tag_string=(2)') // .then(function (response) { // console.log(response); // }); // axios.post('/user', { // firstName: 'Fred', // lastName: 'Flintstone' // }).then(function (response) { // console.log(response); // }) $( "#1" ).click(function() { $.ajax('http://172.105.205.52:8000/tags', { type: 'GET', // http method headers: { 'Access-Control-Allow-Origin': '*' }, success: function (res) { var myJSON = JSON.stringify(res); // var a = res; // console.log(res); var d = JSON.parse(myJSON); console.log(d[0].name); }, error: function (err) { console.log(err); } }); }); // $( "#2" ).click(function() { // $.ajax('http://172.105.205.52:8000/tags', { // type: 'GET', // http method // headers: { 'Access-Control-Allow-Origin': '*' }, // success: function (res) { // var myJSON = JSON.stringify(res); // // var a = res; // // console.log(res); // var d = JSON.parse(myJSON); // console.log(d[1].name); // }, // error: function (err) { // console.log(err); // } // }); // }); // $( "#3" ).click(function() { // $.ajax('http://172.105.205.52:8000/tags', { // type: 'GET', // http method // headers: { 'Access-Control-Allow-Origin': '*' }, // success: function (res) { // var myJSON = JSON.stringify(res); // // var a = res; // // console.log(res); // var d = JSON.parse(myJSON); // console.log(d[2].name); // }, // error: function (err) { // console.log(err); // } // }); // }); // $( "#4" ).click(function() { // $.ajax('http://172.105.205.52:8000/tags', { // type: 'GET', // http method // headers: { 'Access-Control-Allow-Origin': '*' }, // success: function (res) { // var myJSON = JSON.stringify(res); // // var a = res; // // console.log(res); // var d = JSON.parse(myJSON); // console.log(d[3].name); // }, // error: function (err) { // console.log(err); // } // }); // }); // $( "#5" ).click(function() { // $.ajax('http://172.105.205.52:8000/tags', { // type: 'GET', // http method // headers: { 'Access-Control-Allow-Origin': '*' }, // success: function (res) { // var myJSON = JSON.stringify(res); // // var a = res; // // console.log(res); // var d = JSON.parse(myJSON); // console.log(d[4].name); // }, // error: function (err) { // console.log(err); // } // }); // }); // 手機板menu彈跳視窗 $("#menu-box2").hide(); $("#menu-box").hide(); $(".link").click(function () { $("#menu-box").fadeOut("slow", function () { $("#menu-box2").fadeOut("slow"); // Animation complete. }); }); $("#menu-btn1").click(function () { $("#menu-box").fadeIn(); $("#menu-box2").fadeIn(); }); $(".close").click(function () { $("#menu-box").fadeOut(); $("#menu-box2").fadeOut(); }); // sec01 最新課程手機輪播 $('#sec01-moblie-container').slick({ arrows: false, slidesToShow: 1, slidesToScroll: 1, infinite: false, centerMode: true, }); $('#sec01-slider-next').click(function () { $('#sec01-moblie-container').slick('slickNext') }); // sec04 專欄報導 手機輪播 $('#sec04-moblie-container').slick({ arrows: false, slidesToShow: 1, slidesToScroll: 1, infinite: false, centerMode: true, }); $('#sec04-slider-next').click(function () { $('#sec04-moblie-container').slick('slickNext') }); // sec03排名table輪播 $('#sec03-slider').slick({ arrows: false, slidesToShow: 1, slidesToScroll: 1, infinite: true, }); $('#sec03-slider-next').click(function () { $('#sec03-slider').slick('slickNext') });