/** * */ jQuery(function ($) { var group = 'menu_1',//也可以使用:$.mouseDelay.get()生成一个不重复的名称 $piveHover = $('#pive-hover'), $piveMenu = $('#pive-menu'), $piveUnhover = $('#pive-unhover'); // 按钮1 $piveHover.mouseDelay(false, group).hover(function () { $piveHover.removeClass('privilege_menu'); $piveHover.addClass('hover'); $piveMenu.show(); }, function () { $piveHover.removeClass('hover'); $piveHover.addClass('privilege_menu'); $piveMenu.hide(); }); // 按钮一的弹出层 $piveMenu.mouseDelay(false, group).hover(null, function () { $piveHover.removeClass('hover'); $piveHover.addClass('privilege_menu'); $piveMenu.hide(); }); }); /*demo script function showhidediv(id){ var title=document.getElementById(id); if(title){ if(title.style.display=='block'){ title.style.visibility='visible'; title.style.display='none'; }else{ title.style.visibility=='visible'; title.style.display='block'; } } } if(typeof(pgvMain) == 'function')pgvMain();*/ $(document).ready(function(){ $("#p_clearfix li").hover(function(){ $(this).find("div").show().animate({"top":"1px"}, 160); },function(){ $(this).find("div").hide().animate({"top":"-110px"}, 160); }); }); //翻页选项 var activity = ""; function setPageOpts(items_per_page){ var opt = {callback: pageselectCallback, items_per_page: items_per_page, num_display_entries: 5, num_edge_entries: 2, prev_text: "前一页", next_text: "后一页" }; return opt; }//setPageOpts function get_activity(qry_para, activity_id, Pagination_id, items_per_page ){ activity = activity_id; //查询总数 var send_para=qry_para + "&qry_limit="+items_per_page+"&qry_start=0&qry_total=1"; $.getJSON("/cgi-bin/privilege/privilege.cgi",send_para,function(data, status){ // alert("total: "+ data.total_num +"__"+ status); if (status == "success" ){ $("#"+Pagination_id).pagination(data.total_num, setPageOpts(items_per_page)); } else{ $("#"+activity).html("很抱歉,服务器暂时繁忙,请稍后再试,感谢您的关注!"); } });//getJSON } /*******************************************************************************/ //翻页回调,首次设定时会回调改函数 function pageselectCallback(page_index, jq) { // alert("call back called " + page_index); var send_para=qry_para + "&qry_limit="+items_per_page+"&qry_start="+ page_index*items_per_page +"&qry_total=0"; $.getJSON("/cgi-bin/privilege/privilege.cgi",send_para,function(data, status){ //alert("callback: "+ data.act_info.length +"__"+ status); if (status == "success" ){ showData(data); } else{ $("#"+activity).html("很抱歉,服务器暂时繁忙,请稍后再试,感谢您的关注!"); } }); return false; }//pageselectCallback //展示查询到的网吧信息 function showData(data){ //alert("come in showData"); var trs=""; $.each(data.act_info, function(n, info){ var content = info.sContent+info.sContent_1+info.sContent_2+info.sContent_3+info.sContent_4+info.sContent_5; trs = trs + "