转载 弹出框colorbox参数 vlc命令参数 转载

原文地址:弹出框colorbox参数作者:木棉树下

Usage

ColorBox accepts settings from an object of key/value pairs, andcan be assigned to any HTML element.

// Format:$(selector).colorbox({key:value, key:value, key:value});
// Examples:// Image links displayed as a group$('a.gallery').colorbox({rel:'gal'});// Ajax$('a#login').colorbox();// Called directly, without assignment to an element:$.colorbox({href:"thankyou.html"});// Called directly with HTML$.colorbox({html:"<h1>Welcome</h1>"});// ColorBox can accept a function in place of a static value:$("a.gallery").colorbox({rel: 'gal', title: function(){    var url = $(this).attr('href');    return '<a href="' + url + '" target="_blank">Open In New Window</a>';}});

Settings

PropertyDefaultDescription
transition"elastic"The transition type. Can be set to "elastic", "fade", or"none".
speed350Sets the speed of the fade and elastic transitions, inmilliseconds.
hreffalseThis can be used as an alternative anchor URL or to associate a URLfor non-anchor elements such as images or form buttons.
$("h1").colorbox({href:"welcome.html"});
titlefalseThis can be used as an anchor title alternative for ColorBox.
relfalseThis can be used as an anchor rel alternative for ColorBox. Thisallows the user to group any combination of elements together for agallery, or to override an existing rel so elements are not groupedtogether.
$("a.gallery").colorbox({rel:"group1"});
Note: The value can also be set to 'nofollow' to disablegrouping.
scalePhotostrueIf true, and if maxWidth, maxHeight, innerWidth, innerHeight,width, or height have been defined, ColorBox will scale photos tofit within the those values.
scrollingtrueIf false, ColorBox will hide scrollbars for overflowing content.This could be used on conjunction with the resize method (seebelow) for a smoother transition if you are appending content to analready open instance of ColorBox.
opacity0.85The overlay opacity level. Range: 0 to 1.
openfalseIf true, ColorBox will immediately open.
returnFocustrueIf true, focus will be returned when ColorBox exits to the elementit was launched from.
fastIframetrueIf false, the loading graphic removal and onComplete event will bedelayed until iframe's content has completely loaded.
preloadingtrueAllows for preloading of 'Next' and 'Previous' content in a group,after the current content has finished loading. Set to false todisable.
overlayClosetrueIf false, disables closing ColorBox by clicking on the backgroundoverlay.
escKeytrueIf false, will disable closing colorbox on 'esc' key press.
arrowKeytrueIf false, will disable the left and right arrow keys fromnavigating between the items in a group.
looptrueIf false, will disable the ability to loop back to the beginning ofthe group when on the last element.
current"image {current} of {total}"Text or HTML for the group counter while viewing a group. {current}and {total} are detected and replaced with actual numbers whileColorBox runs.
previous"previous"Text or HTML for the previous button while viewing a group.
next"next"Text or HTML for the next button while viewing a group.
close"close"Text or HTML for the close button. The 'esc' key will also closeColorBox.
datafalseFor submitting GET or POST values through an ajax request. The dataproperty will act exactly like jQuery's.load()dataargument, as ColorBox uses .load() for ajax handling.
Content Type
iframefalseIf true, specifies that content should be displayed in aniFrame.
inlinefalse

If true, content from the current document can be displayed bypassing the href property a jQuery selector, or jQuery object.

// Using a selector:$("#inline").colorbox({inline:true, href:"#myForm"});// Using a jQuery object:var $form = $("#myForm");$("#inline").colorbox({inline:true, href:$form});
htmlfalse

For displaying a string of HTML or text.

$.colorbox({html:"<p>Hello</p>"});
photofalseIf true, this setting forces ColorBox to display a link as a photo.Use this when automatic photo detection fails (such as using a urllike 'photo.php' instead of 'photo.jpg')
ajaxThis property isn't actually used as ColorBox assumes all hrefsshould be treated as either ajax or photos, unless one of the othercontent types were specified.
Dimensions
widthfalseSet a fixed total width. This includes borders and buttons.Example: "100%", "500px", or 500
heightfalseSet a fixed total height. This includes borders and buttons.Example: "100%", "500px", or 500
innerWidthfalseThis is an alternative to 'width' used to set a fixed inner width.This excludes borders and buttons. Example: "50%", "500px", or500
innerHeightfalseThis is an alternative to 'height' used to set a fixed innerheight. This excludes borders and buttons. Example: "50%", "500px",or 500
initialWidth300Set the initial width, prior to any content being loaded.
initialHeight100Set the initial height, prior to any content being loaded.
maxWidthfalseSet a maximum width for loaded content. Example: "100%", 500,"500px"
maxHeightfalseSet a maximum height for loaded content. Example: "100%", 500,"500px"
Slideshow
slideshowfalseIf true, adds an automatic slideshow to a content group /gallery.
slideshowSpeed2500Sets the speed of the slideshow, in milliseconds.
slideshowAutotrueIf true, the slideshow will automatically start to play.
slideshowStart"start slideshow"Text for the slideshow start button.
slideshowStop"stop slideshow"Text for the slideshow stop button
Positioning
fixedfalseIf true, ColorBox will be displayed in a fixed position within thevisitor's viewport. This is unlike the default absolute positioningrelative to the document.
topfalseAccepts a pixel or percent value (50, "50px", "10%"). ControlsColorBox's vertical positioning instead of using the defaultposition of being centered in the viewport.
bottomfalseAccepts a pixel or percent value (50, "50px", "10%"). ControlsColorBox's vertical positioning instead of using the defaultposition of being centered in the viewport.
leftfalseAccepts a pixel or percent value (50, "50px", "10%"). ControlsColorBox's horizontal positioning instead of using the defaultposition of being centered in the viewport.
rightfalseAccepts a pixel or percent value (50, "50px", "10%"). ControlsColorBox's horizontal positioning instead of using the defaultposition of being centered in the viewport.
Callbacks
onOpenfalseCallback that fires right before ColorBox begins to open.
onLoadfalseCallback that fires right before attempting to load the targetcontent.
onCompletefalseCallback that fires right after loaded content is displayed.
onCleanupfalseCallback that fires at the start of the close process.
onClosedfalseCallback that fires once ColorBox is closed.

Public Methods

$.colorbox()This method allows you to call ColorBox without having to assign itto an element.
$.colorbox({href:"login.php"});
$.colorbox.next()
[转载]弹出框colorbox参数 vlc命令参数 转载
$.colorbox.prev()
These methods moves to the next and previous items in a group andare the same as pressing the 'next' or 'previous' buttons.
$.colorbox.close()This method initiates the close sequence, which does notimmediately complete. The lightbox will be completely closed onlywhen the 'cbox_closed' event / onClosed callback is fired.
$.colorbox.element()This method is used to fetch the current HTML element that ColorBoxis associated with. Returns a jQuery object containing the element.
var $element = $.colorbox.element();
$.colorbox.resize()This allows ColorBox to be resized based on it's ownauto-calculations, or to a specific size. This must be calledmanually after ColorBox's content has loaded. The optionalparameters object can accept 'width' or 'innerWidth' and 'height'or 'innerHeight'. Without specifying a width or height, ColorBoxwill attempt to recalculate the height of it's currentcontent.
$.colorbox.remove()Removes all traces of ColorBox from the document. Not the same as$.colorbox.close(), which tucks colorbox away for future use.

Event Hooks

These event hooks fire at the same time as their correspondingcallbacks (ie. cbox_complete & onComplete), but canbe used to make a universal change to ColorBox, while callbacks areonly applied to selected elements.

// Example of using an event listener and public method to build a primitive slideshow:$(document).bind('cbox_complete', function(){    setTimeout($.colorbox.next, 1500);});
cbox_opentriggers when ColorBox is first opened, but after a few keyvariable assignments take place.
cbox_loadtriggers at the start of the phase where content type is determinedand loaded.
cbox_completetriggers when the transition has completed and the newly loadedcontent has been revealed.
cbox_cleanuptriggers as the close method begins.
cbox_closedtriggers as the close method ends.

  

爱华网本文地址 » http://www.aihuau.com/a/25101015/256117.html

更多阅读

U盘总是无法弹出怎么办 u盘总是无法弹出

U盘总是无法弹出怎么办——简介U盘老是无法安全拔出。U盘总是无法弹出怎么办——方法/步骤U盘总是无法弹出怎么办 1、先检查是否在播放音乐,视频(即使没有,也要关闭播放过U盘中音乐,视频的软件)。以及是否打开了U盘中的文件及程序。如果

IE弹出 ocget.dll 安全提示 解决方案 ocget.dll缺失怎么办

IE弹出 ocget.dll 安全提示 解决方案——简介本人最近打开IE遇到此问题,Internet Explorer - Security WarningName: ocget.dll,想必很多人遇到 过吧,下面介绍下解决办法IE弹出 ocget.dll 安全提示 解决方案——工具/原料电脑IE弹

怎么打开关闭的QQ新闻弹出窗口 qq弹出新闻怎么关闭

怎么打开关闭的QQ新闻弹出窗口——简介腾讯的QQ弹窗让大家都很烦恼,各种新闻广告弹出来……但是,有时习惯了这些弹窗,想看看新闻,那么,在关闭了这个新闻弹出窗口后,怎么再打开呢?下面分两种情况讨论这个QQ新闻弹窗。怎么打开关闭的QQ新闻

声明:《转载 弹出框colorbox参数 vlc命令参数 转载》为网友笑对人生分享!如侵犯到您的合法权益请联系我们删除