1 .
4.
$(".tt-item .cf>li").each(function () {
if ($('a', this).hasClass("current")) {
var indexr0 = $(".tt-item .cf>li").index(this);
saveTabIndexarr.push(indexr0);
$("#tabUIDetail>li").each(function () {
if ($(this).hasClass("current")) {
var indexr1 = $("#tabUIDetail>li").index(this);
saveDayIndex = indexr1;
savePageIndex = (index+1);
saveTabIndex = indexr0;
InitTable(index, indexr0, indexr1);
}
})
}
})
2.
if ($("#Result tbody>tr").length != 1) {
$("#Result tbody>tr:last-child").siblings().remove();
$("#Result tbody>tr:last-child").parent().prepend(newcontent);
}
else {
$("#Result tbody>tr:last-child").parent().prepend(newcontent);
}
3.
<link href="/Scripts/pagination/pagination.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery.showLoading.js" type="text/javascript"></script>
<script src="/Scripts/pagination/jquery.pagination.js" type="text/javascript"></script>
//翻页调用
function PageCallback(index, jq) {
$(".tt-item .cf>li").each(function () {
if ($('a', this).hasClass("current")) {
var indexr0 = $(".tt-item .cf>li").index(this);
saveTabIndexarr.push(indexr0);
$("#tabUIDetail>li").each(function () {
if ($(this).hasClass("current")) {
var indexr1 = $("#tabUIDetail>li").index(this);
saveDayIndex = indexr1;
savePageIndex = (index+1);
saveTabIndex = indexr0;
InitTable(index, indexr0, indexr1);
}
})
}
})
}
$("#Pagination").pagination(totalCount, {
callback: PageCallback,
prev_text: '<<上一页',
next_text: '下一页>>',
items_per_page: pageSize,
num_display_entries: 6,
current_page: pageIndex,
num_edge_entries: 2
});
4.
$(".blue.de-d.clearfix>li").each(function () {
$(this).bind("click", function () {
if(!$(this).hasClass("de-d-i")){
$(this).addClass("current").siblings().removeClass("current");
}
})
})
5.
function PageCallback(pageindex, jq) {
var obj = $(".tabUl.cf>li[class='current']");
var index = $(".tabUl.cf>li").index(obj);
var shou = $("#shou").val();
var industry = $("#industries").val();
var area = $("#areas").val();
var stockno = $("#stockno").val();
if (stockno == '代码')
stockno = '';
InitTable(pageindex+1,index,shou,industry,area,stockno);
}
6.
function settab() {
var now=new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
if ((hours == 9 && minutes >= 31) || (hours == 10 && minutes <= 30)) {
$(".tabUl.cf>li:eq(0)").addClass("current").siblings().removeClass("current");
}
else if ((hours == 10 && minutes >= 31) || (hours == 11 && minutes <= 30)) {
$(".tabUl.cf>li:eq(1)").addClass("current").siblings().removeClass("current");
}
else if (hours == 13) {
$(".tabUl.cf>li:eq(2)").addClass("current").siblings().removeClass("current");
}
else if (hours == 14) {
$(".tabUl.cf>li:eq(3)").addClass("current").siblings().removeClass("current");
}
}
7.
function ClearCondition() {
$("#num option").eq(0).attr('selected', 'true');
$("#industries option").eq(0).attr('selected', 'true');
$("#areas option").eq(0).attr('selected', 'true');
$("#stockno").val('');
}
8.
$(".tt-item .cf>li").each(function () {
$(this).bind("click", function () {
var sublink = $('a', this);
if (!sublink.hasClass('current')) {
$('li', $(this).parent()).children().removeClass("current");
sublink.addClass("current");
var tindex = $(".tt-item .cf>li").index(this);
$(".tabWrap.mt>div:nth-child(" + (tindex + 1) + ")").show().siblings().hide();
if (tindex == 1) {
statistic(0);
}
else if (tindex == 2) {
traderstatistic(0);
}
}
})
});
$(".tabUl.cf>li").each(function () {
$(this).bind("click", function () {
if (!$(this).hasClass("current") && !$(this).hasClass("data_select")) {
$(this).addClass("current").siblings().removeClass("current");
var tabindex = $(".tabWrap.mt>div").index($(this).parent().parent().parent());
if (tabindex == 0) {
var index = $(".tabUl.cf>li").index(this);
if (index != 0) {
if (dataArr != null && dataArr.length != 0) {
var tempArr = $.grep(dataArr, function (value) {
return value.StockClassify == (index == 1 ? '沪市' : '深市');
});
filldata(tempArr);
}
} else {
filldata(dataArr);
}
}
else if (tabindex == 1) {
var ulparent = $("div>ul>li", $(".tabWrap.mt>div:nth-child(2)"));
var index = ulparent.index(this);
statistic(index);
}
else if (tabindex == 2) {
var ulparent = $("div>ul>li", $(".tabWrap.mt>div:nth-child(3)"));
var index = ulparent.index(this);
traderstatistic(index);
}
}
});
});
$("#querydate").change(function () {
var date = $(this).children('option:selected').val();
var queryd = new Date(date).pattern("yyyyMMdd");
get(0, queryd);
});