使用方法,首先引用插件然后调用配置参数
var tpj = jQuery;
tpj.noConflict();
tpj(document).ready(function() {
if (tpj.fn.cssOriginal != undefined) {
tpj.fn.css = tpj.fn.cssOriginal
}
var api = tpj("#revolution-slider").revolution({
delay: 9000,
startwidth: 960,
startheight: 450,
onHoverStop: "on",
thumbWidth: 100,
thumbHeight: 50,
thumbAmount: 3,
hideThumbs: 10,
navigationType: "none",
navigationArrows: "solo",
navigationStyle: "round",
navigationHAlign: "center",
navigationVAlign: "bottom",
navigationHOffset: 30,
navigationVOffset: -40,
soloArrowLeftHalign: "left",
soloArrowLeftValign: "center",
soloArrowLeftHOffset: 20,
soloArrowLeftVOffset: 0,
soloArrowRightHalign: "right",
soloArrowRightValign: "center",
soloArrowRightHOffset: 20,
soloArrowRightVOffset: 0,
touchenabled: "on",
stopAtSlide: -1,
stopAfterLoops: -1,
hideCaptionAtLimit: 0,
hideAllCaptionAtLilmit: 0,
hideSliderAtLimit: 0,
fullWidth: "on",
shadow: 0
});
api.bind("revolution.slide.onloaded",
function(e) {
jQuery(".tparrows").each(function() {
var arrows = jQuery(this);
var timer = setInterval(function() {
if (arrows.css("opacity") == 1 && !jQuery(".tp-simpleresponsive").hasClass("mouseisover")) {
arrows.fadeOut(100)
}
},
0)
});
jQuery(".tp-simpleresponsive, .tparrows").hover(function() {
jQuery(".tp-simpleresponsive").addClass("mouseisover");
jQuery("body").find(".tparrows").each(function() {
jQuery(this).fadeIn(100)
})
},
function() {
if (!jQuery(this).hasClass("tparrows")) {
jQuery(".tp-simpleresponsive").removeClass("mouseisover")
}
})
})
});