12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- var lotLists = [];
- $(function () {
- isFold()
- initLotList();
- $(".hot-lot-lable").click(function () {
- var id = $(this).attr("id");
- var index = $(".hot-lot-lable").index(this);
- $(".hot-lot-lable").removeClass("active").eq(index).addClass("active");
- $(".hot-lottery-content").removeClass("active").eq(index).addClass("active");
- refreshLotList(id);
- })
- $(".wfgz-lable").click(function () {
- var index = $(".wfgz-lable").index(this);
- $(".wfgz-lable").removeClass("active").eq(index).addClass("active");
- $(".wfgz-content").removeClass("active").eq(index).addClass("active");
- })
- $(".lot-title").click(function () {
- var index = $(".lot-title").index(this);
- if ($(this).hasClass("active")) {
- $(this).removeClass("active");
- $(".lot-list-wrapper").eq(index).removeClass("active");
- }
- else {
- $(".lot-title").removeClass("active").eq(index).addClass("active");
- $(".lot-list-wrapper").removeClass("active").eq(index).addClass("active");
- }
- })
- })
- function initLotList() {
- if (lotLists.length > 0) {
- for (var i = 0; i < lotLists.length; i++) {
- lotLists[i].dele();
- }
- }
- lotLists = [];
- $(".typecell-list").each(function (i, e) {
- var c = $(e).children(".lotCode:eq(0)").val();
- var t = $(e).children(".time:eq(0)").val();
- lotLists[i] = new Balljump(e, c, t);
- })
- }
- function refreshLotList(id) {
- $.ajax({
- type: "post",
- url: "/Template/_getNavLotteryTable",
- data: {
- id: id
- },
- success: function (res) {
- $("#GPC-box").html(res);
- initLotList();
- }
- });
- }
- function IsPC() {
- var userAgentInfo = navigator.userAgent;
- var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
- var flag = true;
- for (var v = 0; v < Agents.length; v++) {
- if (userAgentInfo.indexOf(Agents[v]) > 0) {
- flag = false;
- break;
- }
- }
- return flag;
- }
- function isFold() {
- var PC = IsPC();
- if (!PC) {
- $(".main").addClass('pon')
- } else {
- $(".main").removeClass('pon')
- }
- }
|