function donews() {
// tab1.innerhtml = tab2.innerhtml;
var mymar=null;
var tab2 = $("#demo2").get(0);
var tab1 = $("#demo1").get(0);
var tab = $("#demo").get(0);
console.log(tab2)
mymar = setinterval(function() {
if (tab2.offsetwidth - tab2.scrollleft <= 0) {
tab.scrollleft -= tab1.offsetwidth;
} else {
tab.scrollleft++;
}
}, 40);
tab.onmouseover = function() {
clearinterval(mymar);
mymar = null;
};
tab.onmouseout = function() {
mymar = setinterval(function() {
if (tab2.offsetwidth - tab.scrollleft <= 0) {
tab.scrollleft -= tab1.offsetwidth;
} else {
tab.scrollleft++;
}
}, 40);
};
}
donews();
var width = 960,
height = 700;
//球体的转动速度
var velocity = [-.013, .013];
var projection = d3.geo.orthographic()
//.clipangle(90) // 取消注释隐藏后半圆
.center([0, 15])
// .translate([cx, cy])
.scale(width / math.pi)
// .rotate([0, 0, 0]),
var path = d3.geo.path().projection(projection);
var svg = d3.select("#tw_logo").append("svg")
.attr("width", width)
.attr("height", height);
var point = svg.append("path")
.datum(d3.geodesic.multipolpoint(1)) //控制点的数量
.attr("class", "point")
// .attr("style", "color:red");
// .style("color","red");
var feature = svg.append("path")
.datum(d3.geodesic.multilinestring(2)) //控制路径的数量
d3.timer(function (elapsed) {
projection.rotate([elapsed * velocity[0], elapsed * velocity[1]]);
point.attr("d", path);
feature.attr("d", path);
// point.transition()
// .duration(1000)
// .attr("class", "point1");
// point.transition()
// .duration(3000)
// .attr("class", "point");
});
// d3.timeout(function(){
// point.transition()
// .duration(1000)
// .attr("class", "point1");
// },3000)
var myswiper1 = new swiper('.swiper1', {
effect : 'fade',
autoplay:true,//等同于以下设置
autoplay: {
delay: 3000,
stoponlastslide: false,
disableoninteraction: true,
},
pagination: {
el: '.swiper-pagination',
clickable :true
}
});