jquery插件开发如何获取id
问题补充:(function($){
$.fn.galleryView = function(options) {
var opts = $.extend($.fn.galleryView.defaults,options);
alert(this);
alert(opts.panel_width);
};
$.fn.galleryView.defaults = {
panel_width: 400,
panel_height: 300,
frame_width: 80,
frame_height: 80,
filmstrip_size: 3,
overlay_height: 70,
overlay_font_size: '1em',
transition_speed: 400,
transition_interval: 6000,
overlay_opacity: 0.6,
overlay_color: 'black',
background_color: 'black',
overlay_text_color: 'white',
caption_text_color: 'white',
border: '1px solid black',
nav_theme: 'light',
easing: 'swing',
filmstrip_position: 'bottom',
overlay_position: 'bottom',
show_captions: false,
fade_panels: true,
pause_on_hover: false
};
})(jQuery);
下面是调用方法
$('#要获取的i的').galleryView({
panel_width: 800,
panel_height: 300,
frame_width: 100,
frame_height: 100
});
我如何才能获取我调用的那个id呢?
提问者:花嫁婚庆礼仪 1回答 浏览次数:2560 提问时间:
2021/12/01 11:42