|
|
@@ -381,29 +381,28 @@ function bindEventTeaOrignalYS() {
|
|
|
var curAlt = $(this).attr("alt");//播放视频地址
|
|
|
playVisiableAudioCallBack(2, $(this).attr("alt"));
|
|
|
});
|
|
|
- //处理表格样式
|
|
|
$("td").attr("style", "");
|
|
|
+ //处理表格样式
|
|
|
+ $(".container-table").each(function (index, item) {
|
|
|
+ var TableWidth = isNaN(parseFloat($(item).find("table").css("width"))) ? 0 : parseFloat($(item).find("table").css("width"));
|
|
|
+ var ScrollLeft = isNaN(parseFloat($(item).scrollLeft())) ? 0 : parseFloat($(item).scrollLeft());
|
|
|
+ var SSWidth = 2 * bodyWidth - TableWidth; // 显示滚动条宽度
|
|
|
+ if (TableWidth > bodyWidth) {
|
|
|
+ var HtmlStr = "<div class='ShowSBar' style='width:" + bodyWidth + "px;height:5px;background-color:#eee;position:relative;left:0px;bottom:3px;z-index:2;'><div class='ShowSBarC' style='width:" + SSWidth + "px;height:5px;background-color:#ccc;position:absolute;left:" + ScrollLeft + "px;bottom:0px;z-index:3;'></div></div>";
|
|
|
+ $(item).after(HtmlStr);
|
|
|
+ }
|
|
|
+ });
|
|
|
$(".container-table").on("touchstart", function () {
|
|
|
var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0 : parseFloat($(this).find("table").css("width"));
|
|
|
if (TableWidth > bodyWidth) {
|
|
|
pressTableFlag = true;
|
|
|
- var ShowSBarName = $(this).next().attr("class");
|
|
|
- if (ShowSBarName != "ShowSBar") {
|
|
|
- var HtmlStr = "<div class='ShowSBar' style='width:" + bodyWidth + "px;height:5px;background-color:#eee;position:relative;left:0px;bottom:3px;z-index:2;'></div>";
|
|
|
- $(this).after(HtmlStr);
|
|
|
- }
|
|
|
}
|
|
|
}).on("touchmove", function () {
|
|
|
var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0 : parseFloat($(this).find("table").css("width"));
|
|
|
var ScrollLeft = isNaN(parseFloat($(this).scrollLeft())) ? 0 : parseFloat($(this).scrollLeft());
|
|
|
var SSWidth = 2 * bodyWidth - TableWidth; // 显示滚动条宽度
|
|
|
var ShowSBarName = $(this).next().attr("class");
|
|
|
- if (ScrollLeft >= 0 && ShowSBarName == "ShowSBar" && $(this).next().find(".ShowSBarC").length == 0) {
|
|
|
- // 没有滚动条添加滚动条
|
|
|
- var AddSWidth = "<div class='ShowSBarC' style='width:" + SSWidth + "px;height:5px;background-color:#ccc;position:absolute;left:" + ScrollLeft + "px;bottom:3px;z-index:3;'></div>";
|
|
|
- $(this).next().append(AddSWidth);
|
|
|
- }
|
|
|
- else if (ScrollLeft >= 0 && ShowSBarName == "ShowSBar" && $(this).next().find(".ShowSBarC").length > 0) {
|
|
|
+ if (ScrollLeft >= 0 && ShowSBarName == "ShowSBar" && $(this).next().find(".ShowSBarC").length > 0) {
|
|
|
// 有滚动条的进行移动
|
|
|
$(this).next().find(".ShowSBarC").css("left", ScrollLeft + "px");
|
|
|
}
|
|
|
@@ -635,9 +634,11 @@ function bindEventYS() {
|
|
|
var curAlt = $(this).attr("alt");//播放视频地址
|
|
|
playVisiableAudioCallBack(2, $(this).attr("alt"));
|
|
|
});
|
|
|
+ $("td").attr("style", "");
|
|
|
//处理表格样式
|
|
|
$(".container-table").each(function (index, item) {
|
|
|
var TableWidth = isNaN(parseFloat($(item).find("table").css("width"))) ? 0 : parseFloat($(item).find("table").css("width"));
|
|
|
+ console.log(TableWidth);
|
|
|
var ScrollLeft = isNaN(parseFloat($(item).scrollLeft())) ? 0 : parseFloat($(item).scrollLeft());
|
|
|
var SSWidth = 2 * bodyWidth - TableWidth; // 显示滚动条宽度
|
|
|
if (TableWidth > bodyWidth) {
|
|
|
@@ -645,7 +646,6 @@ function bindEventYS() {
|
|
|
$(item).after(HtmlStr);
|
|
|
}
|
|
|
});
|
|
|
- $("td").attr("style", "");
|
|
|
$(".container-table").on("touchstart", function () {
|
|
|
var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0 : parseFloat($(this).find("table").css("width"));
|
|
|
if (TableWidth > bodyWidth) {
|