资 源 简 介
(function($){
$.fn.jSpotlight = function(options) {
var defaults = {
active: "active",
inactive: "inactive",
attr: "title",
title_class: "title",
title_effect: "fade",
title_speed: 300,
title: true
};
var options = $.extend(defaults, options);
return this.each(function() {
// object is the selected pagination element list
var obj = $(this);
// if titling is enabled add the title element to each of the children
if (options.title) {
obj.children().each(function(){
var title_value = $(this).find("img").attr(options.attr);
var title_dom_element = ""+title_value+"";
$(this).append(title_dom_element);
});