|
@@ -124,4 +124,143 @@ $("*").each(function (index, element) {
|
|
// html 在滾動滾輪時 停止 html 所有效果
|
|
// html 在滾動滾輪時 停止 html 所有效果
|
|
$("html").on("mousewheel", function () {
|
|
$("html").on("mousewheel", function () {
|
|
$("html").stop();
|
|
$("html").stop();
|
|
- });
|
|
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ $(".sec03-table-title").addClass("contant-toggle");
|
|
|
|
+
|
|
|
|
+$("#sec03-slider").on('beforeChange', function (event, slick, currentSlide, nextSlide) {
|
|
|
|
+ console.log('beforeChangeEvent: currenSlide=' + currentSlide + ', nextSlide= ' + nextSlide);
|
|
|
|
+ if (nextSlide == 1) {
|
|
|
|
+ $(".sec03-table-title").removeClass("contant-toggle");
|
|
|
|
+ $(".sec03-table-title2").addClass("contant-toggle");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ else if (nextSlide == 0) {
|
|
|
|
+ $(".sec03-table-title2").removeClass("contant-toggle");
|
|
|
|
+ $(".sec03-table-title").addClass("contant-toggle");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+// 電腦版email
|
|
|
|
+$.fn.serializeObject = function () {
|
|
|
|
+ var o = {};
|
|
|
|
+ var a = this.serializeArray();
|
|
|
|
+ // o["id"] = 0;
|
|
|
|
+ // o["time_stamp"] = "";
|
|
|
|
+ $.each(a, function () {
|
|
|
|
+ if (o[this.name]) {
|
|
|
|
+ if (!o[this.name].push) {
|
|
|
|
+ o[this.name] = [o[this.name]];
|
|
|
|
+ }
|
|
|
|
+ o[this.name].push(this.value || '');
|
|
|
|
+ } else {
|
|
|
|
+ o[this.name] = this.value || '';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ return o;
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+$(".contact-form-destop").submit(function (e) {
|
|
|
|
+ /* var formRef = $('#form1').serializeArray();
|
|
|
|
+ var jsonString = JSON.stringify(formRef);*/
|
|
|
|
+ var jsonInfo = $('.contact-form-destop').serializeObject();
|
|
|
|
+ var jsonString = JSON.stringify(jsonInfo);
|
|
|
|
+ console.log(jsonString),
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: 'GET',
|
|
|
|
+ url: 'http://172.105.205.52:8003/get_sub_list',
|
|
|
|
+ data: jsonString,
|
|
|
|
+ dataType: 'json',
|
|
|
|
+
|
|
|
|
+ success: function (data) {
|
|
|
|
+ console.log('送出成功: ' + data);
|
|
|
|
+ alert("送出成功");
|
|
|
|
+ // if (data == 0) {
|
|
|
|
+ // alert("送出成功");
|
|
|
|
+ // } else if (data == 1) {
|
|
|
|
+ // alert("此email已填過表單");
|
|
|
|
+ // } else if (data == 2) {
|
|
|
|
+ // alert("此phone已填過表單");
|
|
|
|
+ // } else if (data == 3) {
|
|
|
|
+ // alert("此email、phone已填過表單");
|
|
|
|
+ // }
|
|
|
|
+ // location.reload();
|
|
|
|
+ },
|
|
|
|
+ beforeSend: function () {
|
|
|
|
+ console.log('beforeSend');
|
|
|
|
+ },
|
|
|
|
+ complete: function () {
|
|
|
|
+ console.log('complete');
|
|
|
|
+ },
|
|
|
|
+ error: function (jqXHR, textStatus, errorThrown) {
|
|
|
|
+ console.log(JSON.stringify(jqXHR));
|
|
|
|
+ console.log("AJAX errr: " + textStatus + ' : ' + errorThrown);
|
|
|
|
+ console.log('送出失敗: ' + jqXHR.responseText);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+// 手機板 email
|
|
|
|
+$.fn.serializeObject = function () {
|
|
|
|
+ var o = {};
|
|
|
|
+ var a = this.serializeArray();
|
|
|
|
+
|
|
|
|
+ $.each(a, function () {
|
|
|
|
+ if (o[this.name]) {
|
|
|
|
+ if (!o[this.name].push) {
|
|
|
|
+ o[this.name] = [o[this.name]];
|
|
|
|
+ }
|
|
|
|
+ o[this.name].push(this.value || '');
|
|
|
|
+ } else {
|
|
|
|
+ o[this.name] = this.value || '';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ return o;
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+$(".contact-form-mobile").submit(function (e) {
|
|
|
|
+ /* var formRef = $('#form1').serializeArray();
|
|
|
|
+ var jsonString = JSON.stringify(formRef);*/
|
|
|
|
+ var jsonInfo = $('.contact-form-mobile').serializeObject();
|
|
|
|
+ var jsonString = JSON.stringify(jsonInfo);
|
|
|
|
+ console.log(jsonString),
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: 'GET',
|
|
|
|
+ url: 'http://172.105.205.52:8003/get_sub_list',
|
|
|
|
+ data: jsonString,
|
|
|
|
+ dataType: 'json',
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ success: function (data) {
|
|
|
|
+ console.log('送出成功: ' + data);
|
|
|
|
+ alert("送出成功");
|
|
|
|
+ // if (data == 0) {
|
|
|
|
+ // alert("送出成功");
|
|
|
|
+ // } else if (data == 1) {
|
|
|
|
+ // alert("此email已填過表單");
|
|
|
|
+ // } else if (data == 2) {
|
|
|
|
+ // alert("此phone已填過表單");
|
|
|
|
+ // } else if (data == 3) {
|
|
|
|
+ // alert("此email、phone已填過表單");
|
|
|
|
+ // }
|
|
|
|
+ location.reload();
|
|
|
|
+ },
|
|
|
|
+ beforeSend: function () {
|
|
|
|
+ console.log('beforeSend');
|
|
|
|
+ },
|
|
|
|
+ complete: function () {
|
|
|
|
+ console.log('complete');
|
|
|
|
+ },
|
|
|
|
+ error: function (jqXHR, textStatus, errorThrown) {
|
|
|
|
+ console.log(JSON.stringify(jqXHR));
|
|
|
|
+ console.log("AJAX errr: " + textStatus + ' : ' + errorThrown);
|
|
|
|
+ console.log('送出失敗: ' + jqXHR.responseText);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+});
|