/* 需使用 jquery 1.7 以上版本 用來獲得 新聞台各個 功能 link 的使用頻率 */ jQuery.noConflict(); jQuery(function() { //前台 - 站台名稱 jQuery("#pageheader h1").on("click", "a", function(event){ st_function_clk( event , jQuery(this).attr("id") ); }); ////前台上方 banner [ 首頁 關於本站 留言板 文章地圖 ] //jQuery("ul.serviceList li").on("click", "a", function(event){ // st_function_clk( event , jQuery(this).attr("id") ); //}); //前台邊欄 - 加入好友,鼓勵本站 我的站台 新增文章 快速發文 管理後台 站台隨意逛 jQuery("div.side div").on("click", "a", function(event){ st_function_clk( event ,jQuery(this).attr("id") ); }); ////後台 //埋左邊樹狀 click jQuery("#menu4outline span").on("click", "a", function(event){ st_function_clk( event ,jQuery(this).attr("id") ); }); //埋中間列表 click jQuery("div.w149l_se").on("click", "a", function(event){ st_function_clk( event ,jQuery(this).attr("id") ); }); //埋管理首頁上方tab[ 站台資訊 訪客列表 ... ] click jQuery("td.se_bt4").on("click", "a", function(event){ st_function_clk( event ,jQuery(this).attr("id") ); }); //埋管理首頁上方tab[ 站台資訊 訪客列表 ... ] click jQuery("td.se_bt4_2").on("click", "a", function(event){ //alert( jQuery(this).attr("id") ); st_function_clk( event ,jQuery(this).attr("id") ); }); }); function st_function_clk( event,fun_name ){ if(fun_name==''){return;} if(top.window.location.href.match('.m.pchome.') ) { var post_url ="/website/panel/station_fun_clk.php"; }else{ event.stopPropagation();//Stop click events from bubbling 停止觸發上層樹狀區塊的 click var post_url ="/panel/station_fun_clk.php"; } jQuery.ajax({ async: false, // async: true, type: "POST", data: { "fun_name": fun_name, "uniq_key" : fun_name }, //url: "/panel/station_fun_clk.php", url: post_url, success: function(msg){ return; } }); } function adimg_clk( event,adimg_no ){ if(adimg_no==''){return;} if(top.window.location.href.match('.m.pchome.') ) { var post_url ="/website/panel/station_fun_clk.php"; }else{ event.stopPropagation();//Stop click events from bubbling 停止觸發上層樹狀區塊的 click var post_url ="/panel/station_fun_clk.php"; } jQuery.ajax({ async: false, // async: true, type: "POST", data: { "fun_name": "adimg", "uniq_key" : adimg_no }, url: post_url, success: function(msg){ return; } }); } //Define jQuery Block (function($) { //Define ready event $(function() { //2013-07-29 新 Rule // class name -> fun_click // data-tagname -> 區塊標籤 jQuery(".fun_click").on("click", function(event){ //alert( jQuery(this).attr("data-tagname") ); st_function_clk( event ,jQuery(this).attr("data-tagname") ); }); jQuery(".adimg_click").on("click", function(event){ //alert( jQuery(this).attr("data-tagname") ); adimg_clk( event ,jQuery(this).attr("data-tagname") ); }); }); //ready event Block End })(jQuery); //jQuery Block End