JavaScript hmangin a rawn lang ang
Bootstrap components te chu custom jQuery plugin dozen chuang hmangin nunna pe rawh. A awlsam zawngin telh vek la, a nih loh leh pakhat hnu pakhatin telh bawk ang che.
Bootstrap components te chu custom jQuery plugin dozen chuang hmangin nunna pe rawh. A awlsam zawngin telh vek la, a nih loh leh pakhat hnu pakhatin telh bawk ang che.
Plugins chu pakhat zel (Bootstrap-a *.js
file pakhat zel hmangin), a nih loh leh vawi khatah (using bootstrap.js
or the minified bootstrap.min.js
) dah vek theih a ni.
Both bootstrap.js
leh bootstrap.min.js
plugin zawng zawng file pakhatah a awm vek. Pakhat chauh telh bawk ang che.
Plugin leh CSS component thenkhat chu plugin dang a innghat a ni. Plugin te chu pakhat zel i dah tel a nih chuan docs ah hian heng dependencies te hi check ngei ngei tur a ni. Tin, plugin zawng zawng hi jQuery ah an innghat tih hre bawk ang che (hei hian plugin files hmain jQuery hi a tel tur a ni tihna a ni). jQuery version eng ber nge support tih hriat duh chuan our hi zawt rawh .bower.json
Bootstrap plugin zawng zawng hi JavaScript line khat pawh ziak lovin markup API hmang chauhvin i hmang thei ang. Hei hi Bootstrap-a first-class API a ni a, plugin i hman hunah i ngaihtuah hmasak ber tur a ni.
Chutiang a nih lai chuan, dinhmun thenkhatah chuan he functionality hi off hi duhthusam a ni thei. Chuvangin, document namespaced-a thil thleng zawng zawng unbind-a data attribute API tihtawp theihna pawh kan pe bawk data-api
. Hei hi hetiang hian a lang:
A dang pawhin, plugin bik target tur chuan plugin hming chu namespace atan data-api namespace nen hetiang hian dah mai rawh:
Element khata plugin tam tak atanga data attribute hmang suh. Entirnan, button pakhat hian tooltip a nei ve ve thei lo va, modal a toggle thei bawk. Chutiang ti thei tur chuan wrapping element hmang la.
Tin, Bootstrap plugin zawng zawng hi JavaScript API hmang chauhvin i hmang thei tur a ni tih kan ring bawk. Public API zawng zawng hi single, chainable method a ni a, collection acted on chu a rawn pe kir vek a ni.
Method zawng zawng hian optional options object, method bik target tu string emaw, engmah (default behavior hmanga plugin initiate tu) emaw an pawm tur a ni:
Plugin tin hian an raw constructor chu Constructor
property pakhatah an expose bawk: $.fn.popover.Constructor
. Plugin instance bik i hmuh duh chuan element atanga direct-in la chhuak rawh: $('[rel="popover"]').data('popover')
.
Plugin pakhat tana default settings chu plugin Constructor.DEFAULTS
object chu siam danglamin i thlak thei ang:
A chang chuan Bootstrap plugins te hi UI framework dang nen hman a ngai thin. Hetiang dinhmunah hian namespace collision a awm fo thin. Chutiang a nih chuan i .noConflict
value revert duh plugin chu i call thei ang.
Bootstrap hian plugin tam zawkte thiltih danglam bik atan custom event a pe a. A tlangpuiin, hengte hi infinitive leh past participle form-ah an lo kal a - chutah chuan show
thilthleng pakhat tan tirh lamah infinitive (ex. ) chu a insiam a, a past participle form (ex. shown
) chu thiltih zawh hunah a insiam a ni.
3.0.0 atang khan Bootstrap event zawng zawng hi namespaced vek a ni.
Infinitive event zawng zawng hian preventDefault
functionality an pe vek a. Hei hian action pakhat execution chu a tan hmaa tihtawp theihna a pe a ni.
Bootstrap-a jQuery plugin pakhat zel version chu VERSION
plugin constructor property hmangin a lut thei a ni. Entirnan, tooltip plugin atan chuan:
Bootstrap-a plugins te hi JavaScript tihtawp a nih chuan a bik takin grace takin an tla leh lo. Hetiang a nih avang hian user experience i ngaih pawimawh a nih chuan, i user-te <noscript>
hnena thil awmdan (leh JavaScript re-enable dan tur) hrilhfiah nan hmang la, leh/ emaw, nangmah ngeiin i custom fallback te pawh add rawh.
Bootstrap hian official takin third-party JavaScript library Prototype emaw jQuery UI ang chi a support lo. Despite .noConflict
leh namespaced events, compatibility problem a awm thei a, chu chu nangmah ngeiin i siam that a ngai a ni.
Transition effect awlsam tak tak atan chuan transition.js
JS file dangte bulah vawi khat dah tel bawk ang che. Compiled (or minified) i hmang a nih chuan bootstrap.js
hei hi dah tel a ngai lo—a awm tawh.
Transition.js hi event hrang hrang atana puitu bulpui ber a transitionEnd
nih bakah CSS transition emulator a ni bawk. Plugin dangte chuan CSS transition support a awm leh awm loh enfiah nan leh hanging transition man nan an hmang thin.
A hnuaia JavaScript snippet hmang hian transition te chu globally disable theih a ni a, chu chu transition.js
(or bootstrap.js
or bootstrap.min.js
, a nih dan azirin) load hnuah a lo thleng tur a ni:
Modal te hi streamlined, mahse flexible, dialog prompts a awm a, functionality mamawh tlem ber leh smart defaults te a awm bawk.
Modal dang a la hmuh theih laiin hawn loh tur a ni. Vawi khata modal pakhat aia tam lantir tur chuan custom code a ngai a ni.
Modal pakhat HTML code chu i document-ah top-level position-ah dah tum fo ang che, chutiang chuan component dangin modal hmel leh/ emaw functionality a nghawng loh nan.
Mobile device-a modal hman chungchangah hian caveat thenkhat a awm. A chipchiar zawkna chu kan browser support docs ah hian en rawh .
HTML5 hian a semantics a sawifiah dan avang hian autofocus
HTML attribute hian Bootstrap modal-ah nghawng a nei lo. Chutiang bawka effect nei tur chuan custom JavaScript thenkhat hmang la:
Footer-a header, body leh action set awmna rendered modal.
JavaScript hmangin modal pakhat toggle la, a hnuaia button hi click la. A hnuai lam a pan ang a, page chunglam atang chuan a fade in ang.
Modal title, to , leh amah ngei pawh reference-in leh , add ngei role="dialog"
ang che .aria-labelledby="..."
.modal
role="document"
.modal-dialog
Tin, i modal dialog chungchang sawifiahna chu aria-describedby
on hmangin i pe thei .modal
bawk.
YouTube video modal-a embede tur chuan Bootstrap-a awm lo JavaScript dang a ngai a, chu chuan playback chu automatic-in a titawp thei a, thil dang tam tak a titawp thei bawk. Hrechiang duh tan he Stack Overflow post \angkai tak hi en la .
Modal hian optional size pahnih a nei a, modifier class kaltlangin a .modal-dialog
.
En tur fade in ai chuan modal lang mai mai tur tan chuan .fade
i modal markup atang khan class chu paih chhuak rawh.
Modal chhunga Bootstrap grid system hman tangkai tur chuan .row
s chhungah nest mai .modal-body
la, chutah chuan normal grid system class te hmang rawh.
Modal inang vek trigger vek, content hrang hrang tlemte chauh nei, button bunch khat i nei em? Use event.relatedTarget
leh HTML data-*
attributes ( jQuery kaltlangin pawh ni thei ) hmangin modal chhunga thu awmte chu eng button nge click tih a zirin a danglam thei. relatedTarget
, chungchang chipchiar zawka hriat duh chuan Modal Events docs en rawh.
Modal plugin hian i thup thup chu a mamawh angin a toggle a, data attribute emaw JavaScript hmangin a toggle thei bawk. .modal-open
Tin , <body>
to override default scrolling behavior ah a dah belh bawk a .modal-backdrop
, modal pawn lama click hunah shown modals dismiss theihna tur click area a siam bawk.
JavaScript ziak lovin modal pakhat activate rawh. data-toggle="modal"
Controller element, button ang chi, a data-target="#foo"
or href="#foo"
toggle tur modal bik target tur nen set rawh .
myModal
JavaScript line khata id nei modal chu ko rawh :
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-backdrop=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
backdrop a ni | boolean emaw a string emaw a ni'static' |
dik | Modal-backdrop element a awm bawk. static A nih loh leh, click-a modal khar lo backdrop atan specify bawk ang che. |
keyboard hmangin a ziak a | boolean a ni | dik | Escape key i hmet chuan modal a khar thin |
lantir | boolean a ni | dik | Initialized hunah modal a lantir. |
hla | kawng | diklo | He option hi v3.3.0 atang khan hman tawh loh a ni a, v4 ah pawh tihbo a ni tawh bawk. Chu ai chuan client-side templating emaw data binding framework emaw hmang la, jQuery.load chu nangmah ngeiin koh kan rawt zawk a ni. Remote URL pek a nih chuan jQuery’s method hmangin content vawi khat load a ni ang a , div |
.modal(options)
I content chu modal angin a activate thin. A pawm a, optional options a awm object
bawk .
.modal('toggle')
Modal pakhat chu manual in a toggle thin. Modal a lan tak tak hma emaw a thup hma emaw (chu chu shown.bs.modal
or hidden.bs.modal
event a thlen hma) caller hnenah a kir leh thin.
.modal('show')
Manual takin modal a hawng thin. Modal a lan tak takshown.bs.modal
hmain (chu chu event a thlen hmain ) caller hnenah a kir leh thin.
.modal('hide')
Manual takin modal a thup thin. Modal a thup tak tak hmain (chu chu hidden.bs.modal
event a thlen hma) caller hnenah a kir leh thin.
.modal('handleUpdate')
Scrollbar pakhat a lo lang a nih chuan counter turin modal positioning a siam tha leh a, chu chuan modal chu veilamah a zuang thla ang.
Modal hawn laiin a san zawng a inthlak hunah chauh mamawh a ni.
Bootstrap-a modal class hian modal functionality-a hooking-na tur event tlemte a pholang a ni.
Modal event zawng zawng hi modal ngeiah (ie at the <div class="modal">
).
Thil thleng chi hrang hrang | Hrilhfiahna |
---|---|
show.bs.modal a ni | show He event hi instance method kan koh chuan a fire nghal vek a ni. Click avanga lo awm a nih chuan click element chu relatedTarget event property atan a awm thei. |
tih a ni.bs.modal | He event hi modal chu user hmuh theiha siam a nih hunah fire a ni (CSS transition zawh hun a nghak ang). Click avanga lo awm a nih chuan click element chu relatedTarget event property atan a awm thei. |
thup.bs.modal a ni | hide He event hi instance method koh a nih chuan a fire nghal a ni. |
thup.bs.modal tih a ni | He event hi modal chu user hnen atanga thup a nih zawh chuan a fire thin (CSS transitions zawh hun a nghak ang). |
load a ni.bs.modal a ni | He event hi modal in remote option hmanga content a load tawh chuan a fire thin. |
He plugin awlsam tak hmang hian engkim deuhthaw-ah dropdown menu dah belh la, navbar, tabs, leh pills te pawh a tel.
.open
Data attribute emaw JavaScript hmangin dropdown plugin hian parent list item-a class toggle-in thup (dropdown menu) a toggle a ni.
Mobile device-ah chuan dropdown hawn hian .dropdown-backdrop
menu pawn lama tap i tih hunah dropdown menu khar theihna tur tap area angin a dah belh a, hei hi iOS support dik tak neih a ngai a ni. Hei hian a awmzia chu open dropdown menu atanga dropdown menu dang a switch tur chuan mobile ah extra tap a ngai tihna a ni.
Note: data-toggle="dropdown"
Attribute hi application level-a dropdown menu khar nan rintlak a nih avangin hman reng a tha.
data-toggle="dropdown"
Link emaw button emaw ah dah la , dropdown toggle rawh.
Link button hmanga URL awm reng tur chuan , data-target
tih ai chuan attribute hmang zawk href="#"
ang che.
JavaScript hmangin dropdown te chu call la:
data-toggle="dropdown"
a la mamawh reng a niJavaScript hmanga i dropdown i call emaw, a aiah data-api hmang emaw pawh nise, data-toggle="dropdown"
dropdown-a trigger element-ah hian awm reng a ngai a ni.
Pakhatmah
$().dropdown('toggle')
Navbar emaw tabbed navigation pek tawh dropdown menu chu a toggle thin.
Dropdown event zawng zawng chu .dropdown-menu
's parent element ah fire vek a ni.
Dropdown event zawng zawng hian relatedTarget
property an nei vek a, a value chu toggling anchor element a ni.
Thil thleng chi hrang hrang | Hrilhfiahna |
---|---|
show.bs.chu chu a rawn lang leh ta | He event hi show instance method a koh chuan a fire nghal vek a ni. |
tih a ni.bs.dropdown | He event hi dropdown chu user hmuh theiha siam a nih chuan a fire thin (CSS transition a nghak ang, a zawh theih nan). |
hide.bs.chu chu a rawn lang leh ta | He event hi hide instance method koh a nih chuan a fire nghal a ni. |
thup.bs.dropdown a ni | He event hi dropdown chu user hnen atanga thup a nih zawh chuan a fire thin (CSS transitions a nghak ang, a zawh theih nan). |
ScrollSpy plugin hi scroll position a zirin nav target te automatic a update theihna tur a ni. Navbar hnuaia area chu scroll la, active class inthlak dan chu en rawh. Dropdown sub items te pawh a rawn lang ang.
A rilru a buai em em a, a rilru a hah em em bawk a. Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi an hralh chhuah hma qui. Tumblr farm-to-table bicycle dikna eng pawh ni se. Anim keffiyeh chuan carles cardigan a ti a. Velit seitan mcsweeney thlalak booth 3 savawm thla irure. A rilru a buai em em a, a rilru a hah em em bawk a, a rilru a buai em em bawk a, a rilru a hah em em bawk a, a rilru a hah em em bawk a, a rilru a hah em em bawk a. et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh kut hnathawktu ullamco consequat.
Veniam marfa hmul nei skateboard, adipisicing fugiat velit pitchfork hmul. A rilru a buai em em a, a rilru a hah em em bawk a. mcsweeney's vero. Cupidatat pali loko nisi, ea helvetica nulla carles. Tattoo nei cosby sweater ei tur phur truck, mcsweeney-a quis non freegan vinyl a ni. Lo-fi wes anderson +1 chuan a rawn ti a. A rilru a buai em em a, a rilru a hah em em bawk a. Carles non aesthetic exercise quis gentrify. Brooklyn adipisicing kutchhuak beer vice keytar deserunt.
Occaecat commodo a ni a, a hnah hi a hring vek a ni. A rilru a buai em em a, a rilru a hah em em bawk a. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore pakhat chauh awmna coffee in magna veniam. Nunna sang id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS chuan a ti a. Consectetur nisi DIY messenger bag tlem ber a ni. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a. fanny pack iphone.
In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.
Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
Keytar twee blog, culpa messenger bag marfa eng pawh delectus ei tur phur truck. A rilru a buai em em a, a rilru a hah em em bawk a. id assumenda. Locavore sed helvetica cliche irony, thundercats te hi i hre lo mai thei consequat hoodie gluten-free lo-fi fap aliquip. Laboure elit placeat an hralh zawh hmain, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan siam fel vek velit a ni. VHS chambray laboris hun rei lote chhunga hman theih a ni. A rilru a buai em em a, a rilru a hah em em bawk a.
Navbar link ah hian resolvable id target a awm tur a ni. Entirnan, a <a href="#home">home</a>
chu DOM-a thil awm ang chi nen a inmil tur a <div id="home"></div>
ni.
:visible
target element te chu ngaihthah a ni:visible
jQuery ang lo target element te chu ngaihthah a ni ang a, an inmil nav item te chu highlight a ni ngai lovang.
Implementation method eng pawh ni se, scrollspy hian position: relative;
i spying element-ah hman a ngai a ni. A tam zawkah chuan hei hi a <body>
ni . , tih loh element dang scrollspying i tih hian set nei la, apply <body>
ngei ngei tur a ni.height
overflow-y: scroll;
I topbar navigation-a awlsam taka scrollspy behavior dah belh data-spy="scroll"
tur chuan, i spy duh element-ah dah la (most typically this would be the <body>
). Tichuan Bootstrap component data-target
eng pawha parent element ID emaw class emaw nen attribute chu add ang che..nav
I CSS i dah hnuah position: relative;
JavaScript hmangin scrollspy chu ko rawh:
.scrollspy('refresh')
DOM atanga elements dah belh emaw paih emaw nena inzawma scrollspy hman hian refresh method chu hetiang hian i ko a ngai ang:
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-offset=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
offset a ni | a zat | 10 a ni | Scroll awmna tur chhut hunah chunglam atanga offset tur pixels. |
Thil thleng chi hrang hrang | Hrilhfiahna |
---|---|
activate rawh.bs.scrollspy tih hi a ni | He event hi scrollspy-in item thar a activate apiangin a fire thin. |
Local content pane hmanga transition-ah tab functionality rang tak, chak tak dah belh la, dropdown menu hmang pawhin. Nested tab te hi a support lo.
Raw denim i la hre lo mai thei jean shorts Austin. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a. Retro synth master cleanse. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a. A rilru a buai em em a, a rilru a hah em em bawk a. dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid a ni a, a man pawh a tlawm hle. A rilru a buai em em a, a rilru a hah em em bawk a. salvia cillum iphone. Seitan aliquip quis cardigan american thawmhnaw, sa thattu voluptate nisi qui.
Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.
Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.
Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.
He plugin hian tabbed navigation component chu a tizau a, tabbable area a dah belh bawk.
JavaScript hmangin tabbable tab te chu enable rawh (tab tin hi a hranin activate a ngai a ni):
Tab hrang hrangte chu kawng hrang hrangin i activate thei ang:
JavaScript engmah ziak lovin tab emaw pill navigation emaw chu element pakhat specify data-toggle="tab"
emaw on emaw mai mai hmangin i activate thei a ni. Tab ah and class te data-toggle="pill"
add chuan Bootstrap tab styling a apply ang a , and class te add chuan pill styling a apply bawk ang .nav
nav-tabs
ul
nav
nav-pills
Tabs fade in siam tur chuan, pakhat zel ah add .fade
rawh .tab-pane
. Tab pane hmasa ber pawhin .in
a bul tanna thu awm chu hmuh theih turin a siam a ngai bawk.
$().tab
Tab element leh content container pakhat a activate thin. Tab hian DOM ah container node targeting a data-target
emaw a nei tur a ni. href
A chunga entirnan kan tarlan te hi tab te hi attribute <a>
nei s te an ni.data-toggle="tab"
.tab('show')
Tab pek chu thlang la, a kaihhnawih thu awmte chu a rawn tarlang ang. A hmaa tab dang thlan tawh zawng zawng chu thlan loh a ni a, a kaihhnawih thu awmte chu a thup vek a ni. Tab pane a lan tak takshown.bs.tab
hmain (chu chu event a thlen hmain ) caller hnenah a kir leh thin.
Tab thar kan lantir hian events te chu a hnuaia mi ang hian a rawn fire thin:
hide.bs.tab
(tuna active tab-ah hian)show.bs.tab
(to-be-shown tab-ah chuan)hidden.bs.tab
(active tab hmasaah khan hide.bs.tab
event atana hman ang chiah kha)shown.bs.tab
(active thar-a just-shown tab-ah chuan, show.bs.tab
event atana hman ang chiah kha)Tab active tawh loh chuan hide.bs.tab
and hidden.bs.tab
events chu a fire dawn lo.
Thil thleng chi hrang hrang | Hrilhfiahna |
---|---|
show.bs.tab ah hian a awm | He event hi tab show-ah a fire a, mahse tab thar a lan hmain a fire thin. Active tab leh a hmaa active tab (a awm chuan) te target turin event.target and hmang ang che .event.relatedTarget |
tih a ni.bs.tab | He event hi tab pakhat a lan hnuah tab show ah a fire thin. Active tab leh a hmaa active tab (a awm chuan) te target turin event.target and hmang ang che .event.relatedTarget |
hide.bs.tab ah hian a awm | He event hi tab thar entir tur a nih hunah a fire thin (chutiang chuan a hmaa active tab kha thup tur a ni). Tuna active tab leh soon-to-be-active tab thar chu target turin event.target and hmang ang che .event.relatedTarget |
thup.bs.tab ah hian a awm | He event hi tab thar a lan hnuah a fire a (chutiang chuan a hmaa active tab kha a thup a ni). Active tab hmasa leh active tab thar target turin event.target and hmang ang che .event.relatedTarget |
Jason Frame ziah jQuery.tipsy plugin tha tak atanga infuih thar; Tooltips hi updated version a ni a, image-ah a innghat lo va, animation atan CSS3 a hmang a, local title storage atan data-attribute a hmang bawk.
Zero-length title nei tooltip te hi a lang ngai lo.
A hnuaia link te hi hover la, tooltips i hmu ang:
Tight pants next level keffiyeh i la hre lo ngei ang. Thlalak booth hmul raw denim letterpress vegan palai bag stumptown. Farm-to-table seitan, mcsweeney-a fixie sustainable quinoa 8-bit american apparel te chuan terry richardson vinyl chambray an nei a, an thil siam chu an hlim hle. Beard stumptown, cardigans banh mi lomo zing khawvar. Tofu biodiesel williamsburg marfa, pali loko mcsweeney chuan vegan chambray a tifai a. A really ironic artisan whatever keytar , scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral a ni.
Option pali a awm a, chunglam, dinglam, hnuai lam, leh veilam aligned te an ni.
Performance avang hian Tooltip leh Popover data-apis te hi opt-in a ni a, chu chu nangmah ngeiin i initialize tur tihna a ni .
Page pakhata tooltip zawng zawng initialize dan pakhat chu an data-toggle
attribute hmanga thlan hi a ni ang:
Tooltip plugin hian content leh markup on demand a siam a, default-in tooltip te chu an trigger element hnuaiah a dah thin.
JavaScript hmangin tooltip chu trigger la:
Tooltip atana markup mamawh chu data
attribute chauh a ni a title
, HTML element-ah chuan tooltip neih i duh a ni. Tooltip pakhata markup siam chu a awlsam deuh a, mahse position (by default-ah top
chuan plugin-in a set) a ngai a ni.
A châng chuan line tam tak wrap thei hyperlink-ah tooltip i dah duh ṭhin. Tooltip plugin default behavior chu horizontal leh vertical-a center-a dah a ni. white-space: nowrap;
Hei hi pumpelh nan i anchor-ah te dah belh rawh .
.btn-group
a emaw an chhunga element-te chunga tooltips i hman hunah .input-group
emaw, table-a inzawm element-te ( <td>
, <th>
, <tr>
, <thead>
, <tbody>
, <tfoot>
)-ah emaw, container: 'body'
duh loh side effects (element zau zawk leh/ emaw, tooltip trigger a nih hunah a rounded corners hloh emaw).
Keyboard hmanga navigate hmangtute tan, a bik takin assistive technology hmangtute tan chuan keyboard-focusable element link, form control, emaw tabindex="0"
attribute nei element duh duh apiangah tooltips chauh i dah tur a ni.
disabled
a or .disabled
element ah tooltip dah tur chuan element chu a chhungah dah la, chutah <div>
chuan tooltip chu apply <div>
zawk rawh.
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-animation=""
.
Hming | Lampang | Hlawhchhamna | Hrilhfiahna |
---|---|---|---|
animation tih a ni | boolean a ni | dik | Tooltip ah CSS fade transition hmangin apply rawh |
container a ni | string | diklo | diklo | Tooltip chu element bik pakhatah a append thin. Entirnan: |
titlai | number | thil | 0 a ni | Tooltip (ms) entir leh thup hun sawn hlat - manual trigger type-ah chuan a hman theih loh Number supply a nih chuan hide/show pahnih ah delay a awm vek a ni Thil awm dan tur chu: |
html tih a ni | boolean a ni | diklo | Tooltip ah HTML dah la. False a nih chuan jQuery-a text method hmangin DOM-ah content dah a ni ang. XSS attack i ngaihtuah chuan text hmang rawh. |
dahna tur hmun a ni | string | thiltih | 'chung' | Tooltip dah dan tur - top | hnuai lam | veilam | dik tak | auto a ni. Function pakhat chu placement hriat nan hman a nih chuan tooltip DOM node chu a argument hmasa ber atan leh triggering element DOM node chu a pahnihna atan hmangin koh a ni. Context chu |
selector a ni | hrui | diklo | Selector pek a nih chuan tooltip objects chu target tarlan te hnenah delegate a ni ang. A taka hman chuan hei hi dynamic HTML content-a tooltips dah belh theihna turin hman a ni. Hei hi leh entîrna thu hriat theihna en rawh . |
template a ni | hrui | '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' |
Tooltip siam huna hman tur HTML base rawh. Tooltip's
Wrapper element pawn lam ber chuan |
nihna | string | thiltih | '' tih a ni. |
Function pek a nih chuan a |
ti per | hrui | 'hover focus' tih a ni. | Tooltip a trigger dan - | tih kha click la hover rawh | focus | kuta thawh. Trigger tam tak i pass thei a; space hmangin then hran rawh. manual trigger dang nen pawh a inzawm thei lo. |
en theihna hmun a ni | string | thil awmze nei | thiltih | { thlangtu: 'taksa', padding: 0 } . | Tooltip chu he element huam chhungah hian a dah a. Entirnan: Function pek a nih chuan a argument awmchhun atan triggering element DOM node hmangin koh a ni. Context chu |
Tooltip hrang hrang atana option hrang hrangte chu a dangin data attribute hmanga tarlan theih a ni a, a chunga kan sawi tawh ang khan.
$().tooltip(options)
Element collection pakhatah tooltip handler a attache thin.
.tooltip('show')
Element pakhat tooltip a pholang. Tooltip a lan tak tak hmain (chu chu shown.bs.tooltip
event a thlen hmain) caller hnenah a kir leh thin. Hei hi tooltip "manual" triggering anga ngaih a ni. Zero-length title nei tootip te hi a lang ngai lo.
.tooltip('hide')
Element pakhat tooltip a thup thin. Tooltip a thup tak tak hmain (chu chu hidden.bs.tooltip
event a thlen hmain) caller hnenah a kir leh thin. Hei hi tooltip "manual" triggering anga ngaih a ni.
.tooltip('toggle')
Element pakhat tooltip a toggle thin. Tooltip a lan tak tak emaw a thup hma emaw (chu chu shown.bs.tooltip
or hidden.bs.tooltip
event a thlen hma) caller hnenah a kir leh thin. Hei hi tooltip "manual" triggering anga ngaih a ni.
.tooltip('destroy')
Element pakhat tooltip a thup a, a tichhia bawk. Delegation hmanga siam Tooltips ( option hmanga siamselector
) te chu descendant trigger elements ah pakhat zel tihchhiat theih a ni lo.
Thil thleng chi hrang hrang | Hrilhfiahna |
---|---|
show.bs.a hmanrua te chu entir rawh | show He event hi instance method kan koh chuan a fire nghal vek a ni. |
tih a ni.bs.tooltip | He event hi tooltip chu user-in a hmuh theiha siam a nih hunah a fire a ni (CSS transition zawh hun a nghak ang). |
hide.bs.a hman dan tur | hide He event hi instance method koh a nih chuan a fire nghal a ni. |
thup.bs.thil hman dan tur | He event hi tooltip chu user hnen atanga thup a nih zawh chuan a fire thin (CSS transitions zawh hun a nghak ang). |
a rawn dah lut.bs.tooltip | show.bs.tooltip He event hi DOM-a tooltip template dah a nih hunah event zawhah fire a ni. |
Secondary information dahna tur element eng pawhah iPad-a awm ang chi content overlay te te te dah belh rawh.
Popovers title leh content pahnih zero-length a nih chuan a lang ngai lo.
Popovers hian Bootstrap version-ah tooltip plugin hi dah tel a ngai a ni.
Performance avang hian Tooltip leh Popover data-apis te hi opt-in a ni a, chu chu nangmah ngeiin i initialize tur tihna a ni .
Page pakhata popover zawng zawng initialize dan pakhat chu an data-toggle
attribute hmanga thlan hi a ni ang:
.btn-group
a emaw an chhunga element-te chunga popovers i hman hian .input-group
, emaw, table-a inzawm element-te ( <td>
, <th>
, <tr>
, <thead>
, <tbody>
, <tfoot>
)-ah emaw, container: 'body'
duh loh side effects (element zau zawk leh/ emaw, popover a trigger hunah a rounded corners hloh emaw).
disabled
A emaw element emaw ah popover dah tur .disabled
chuan element chu a chhungah dah la, chutah chuan <div>
popover chu hnawih <div>
zawk rawh.
A châng chuan line tam tak wrap tu hyperlink-ah popover dah belh i duh ṭhin. Popover plugin default behavior chu horizontal leh vertical-a center-a dah a ni. white-space: nowrap;
Hei hi pumpelh nan i anchor-ah te dah belh rawh .
Option pali a awm a, chunglam, dinglam, hnuai lam, leh veilam aligned te an ni.
A rilru a buai em em a, a rilru a hah em em bawk a. Aenean eu leo quam a ni. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a.
A rilru a buai em em a, a rilru a hah em em bawk a. Aenean eu leo quam a ni. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a.
A rilru a buai em em a, a rilru a hah em em bawk a. Aenean eu leo quam a ni. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a.
A rilru a buai em em a, a rilru a hah em em bawk a. Aenean eu leo quam a ni. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a.
focus
User-in a click leh hunah popovers chu dismiss turin trigger hmang rawh .
Cross-browser leh cross-platform behavior dik tak neih theih nan tag ni lovin tag i hmang tur a ni a , <a>
and attribute te pawh <button>
i dah tel tur a ni.role="button"
tabindex
JavaScript hmangin popovers te chu enable rawh:
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-animation=""
.
Hming | Lampang | Hlawhchhamna | Hrilhfiahna |
---|---|---|---|
animation tih a ni | boolean a ni | dik | Popover ah hian CSS fade transition hmangin apply rawh |
container a ni | string | diklo | diklo | Popover chu element bik pakhatah a append thin. Entirnan: |
lungawi | string | thiltih | '' tih a ni. |
Function pek a nih chuan a |
titlai | number | thil | 0 a ni | Popover (ms) entir leh thup hun sawn hlat - manual trigger type-ah chuan a hman theih loh Number supply a nih chuan hide/show pahnih ah delay a awm vek a ni Thil awm dan tur chu: |
html tih a ni | boolean a ni | diklo | Popover ah chuan HTML kha dah lut rawh. False a nih chuan jQuery-a text method hmangin DOM-ah content dah a ni ang. XSS attack i ngaihtuah chuan text hmang rawh. |
dahna tur hmun a ni | string | thiltih | 'dik' | Popover dah dan tur - top | hnuai lam | veilam | dik tak | auto a ni. Function pakhat hmanga placement hriat chian a nih chuan popover DOM node chu a argument hmasa ber atan leh triggering element DOM node chu a pahnihna atan hmangin koh a ni. Context chu |
selector a ni | hrui | diklo | Selector pek a nih chuan popover objects chu target tarlan te hnenah delegate a ni ang. A taka hman chuan hei hi dynamic HTML content-a popovers dah theihna turin hman a ni. Hei hi leh entîrna thu hriat theihna en rawh . |
template a ni | hrui | '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' |
Popover siam huna hman tur HTML base rawh. Popover's Popover's
Wrapper element pawn lam ber chuan |
nihna | string | thiltih | '' tih a ni. |
Function pek a nih chuan a |
ti per | hrui | 'click' a ti a. | Popover a tihchhuah dan - | hover rawh | focus | kuta thawh. Trigger tam tak i pass thei a; space hmangin then hran rawh. manual trigger dang nen pawh a inzawm thei lo. |
en theihna hmun a ni | string | thil awmze nei | thiltih | { thlangtu: 'taksa', padding: 0 } . | Popover chu he element huam chhungah hian a vawng reng a ni. Entirnan: Function pek a nih chuan a argument awmchhun atan triggering element DOM node hmangin koh a ni. Context chu |
Popover pakhat zel atana duhthlan tur chu a danglamna chu data attribute hmanga tarlan theih a ni a, a chunga kan sawi tawh ang khan.
$().popover(options)
Element collection pakhat atan popovers a initialize thin.
.popover('show')
Element pakhat popover a nihzia a pholang. Popover a lan tak tak hmain (chu chu shown.bs.popover
event a thlen hmain) caller hnenah a kir leh thin. Hei hi popover triggering "manual" anga ngaih a ni. Popovers title leh content pahnih zero-length a nih chuan a lang ngai lo.
.popover('hide')
Element pakhat popover a thup. Popover chu thup tak tak a nih hmain (chu chu hidden.bs.popover
thilthleng a thlen hma) call tu hnenah a kir leh thin. Hei hi popover triggering "manual" anga ngaih a ni.
.popover('toggle')
Element pakhat popover a toggle thin. Popover a lan tak tak emaw a thup hma emaw (chu chu shown.bs.popover
or hidden.bs.popover
event a thlen hma) caller hnenah a kir leh thin. Hei hi popover triggering "manual" anga ngaih a ni.
.popover('destroy')
Element pakhat popover chu a thup a, a tichhe vek bawk. Delegation hmanga siam Popovers ( option hmanga siamselector
) te chu descendant trigger element-ah pakhat zel tihchhiat theih a ni lo.
Thil thleng chi hrang hrang | Hrilhfiahna |
---|---|
show.bs.popover tih hi a ni | show He event hi instance method kan koh chuan a fire nghal vek a ni. |
a lantir.bs.popover | He event hi popover chu user hmuh theiha siam a nih hunah fire a ni (CSS transitions zawh hun a nghak ang). |
thup.bs.popover tih hi a ni | hide He event hi instance method koh a nih chuan a fire nghal a ni. |
thup.bs.retheihna | He event hi popover chu user hnen atanga thup a nih zawh chuan fired a ni (CSS transitions zawh hun a nghak ang). |
a rawn dah lut.bs.popover | show.bs.popover He event hi DOM-a popover template dah a nih hunah event zawhah fired a ni. |
He plugin hmang hian alert message zawng zawngah dismiss functionality add vek ang che.
Button hman hunah chuan a .close
fa hmasa ber a ni tur a ni a .alert-dismissible
, markup-ah chuan a hmaah text content a awm thei lo vang.
Hei leh chu thlak la, ti leh rawh. A rilru a buai em em a, a rilru a hah em em bawk a, a rilru a buai em em bawk a, a rilru a hah em em bawk a, a rilru a hah em em bawk a. A rilru a buai em em a, a rilru a hah em em bawk a.
I close button ah khan add mai la data-dismiss="alert"
, automatic in alert close functionality a pe ang. Alert khar hian DOM atangin a paih chhuak thin.
I alerts te kha khar hunah animation hmang turin, an chungah .fade
leh .in
class te chu an apply tawh tih chian hmasa phawt ang che.
$().alert()
data-dismiss="alert"
Attribute nei descendant element-a click event awmte chu alert ngaithla turin a siam . (Data-api-a auto-initialization hman hunah a ngai lo.)
$().alert('close')
DOM atanga alert lakchhuah hmangin a khar thin. Element -ah hian .fade
and .in
class a awm chuan alert chu a paih hmain a fade out ang.
Bootstrap-a alert plugin hian alert functionality-a hook theihna tur thil thleng tlemte a pholang a ni.
Thil thleng chi hrang hrang | Hrilhfiahna |
---|---|
khar rawh.bs.alert a ni | close He event hi instance method kan koh chuan a fire nghal vek a ni. |
khar a ni.bs.alert | He event hi alert khar a nih hunah fire a ni (CSS transition zawh hun a nghak ang). |
Button hmangin tam zawk ti rawh. Control button state emaw toolbar ang chi component tam zawk tan button group siam emaw a ni.
Firefox hian page load zawng zawngah form control state (disabledness leh checkedness) a persist . Chumi atana workaround chu hman autocomplete="off"
a ni . Mozilla bug #654072 ah hian en rawh .
data-loading-text="Loading..."
Button pakhata loading state hman tur chuan add rawh .
He feature hi v3.3.5 atang khan hman tawh loh a ni a, v4 ah pawh tihbo a ni tawh bawk.
He demonstration atan hian leh , kan hmang data-loading-text
a $().button('loading')
, mahse chu chauh chu state i hman theih a ni lo. Hemi chungchang hi a hnuaia $().button(string)
documentation ah hian en belh rawh .
data-toggle="button"
Button pakhata toggling activate turin Add rawh .
.active
leharia-pressed="true"
Pre-toggled button atan chuan .active
class leh aria-pressed="true"
attribute chu button
yourself ah i dah tur a ni.
Containing checkbox emaw radio inputs ah te dah la data-toggle="buttons"
, .btn-group
anmahni style hrang hranga toggling theihna tur.
.active
.active
Preselected options atan chuan class chu input's ah label
nangmah ngeiin i add tur a ni.
Checkbox button checked state chu button click
-a event fire lovin update a nih chuan (eg input-a property <input type="reset">
setting via emaw via emaw ), input-a class chu nangmah ngeiin i toggle a ngai ang.checked
.active
label
$().button('toggle')
Push state a tidanglam. Button chu a activate tawh angin a lang.
$().button('reset')
Button state a reset - text chu original text ah a inthlak thin. He method hi asynchronous a ni a, resetting a zawh tak tak hmain a rawn kir leh thin.
$().button(string)
Data defined text state eng pawhah text a swap thin.
Flexible plugin hmangin class tlemte hmangin toggle behavior awlsam tak a awm thei.
Collapse hian i version Bootstrap ah transitions plugin kha dah tel a ngai a ni.
A hnuaia button te hi click la, class thlak danglam hmangin element dang a lantir leh thup ang:
.collapse
content a thup thin.collapsing
transition neih laiin hman a ni.collapse.in
thupui a lantirAttribute awmna link i hmang thei a href
, attribute awmna button i hmang thei data-target
bawk. Heng pahnihah hian the data-toggle="collapse"
is required.
Panel component nen accordion siam turin default collapse behavior chu extend rawh.
.panel-body
Tin , s leh s swap out theih a .list-group
ni bawk.
aria-expanded
Control element ah hian add ngei ngei tur a ni. He attribute hian screen reader leh a ang chi assistive technology te hnena collapsible element dinhmun awm mek chu chiang takin a tarlang a ni. Collapsible element chu default-a khar a nih chuan value aria-expanded="false"
. in
Class hmangin collapsible element chu default-a open turin i set tawh a nih chuan aria-expanded="true"
control-ah set zawk rawh. Plugin hian collapsible element hawn leh khar a nih leh nih loh a zirin he attribute hi a toggle nghal vek ang.
Tin, i control element hian collapsible element pakhat a target a nih chuan – chu chu data-target
attribute chuan selector a kawhhmuh a nih chuan id
– control element-ah attribute dang i dah belh thei bawk aria-controls
a, chutah chuan id
of the collapsible element a awm bawk. Tunlai screen reader leh a ang chi assistive technology te chuan he attribute hi an hmang a, chu chuan a hmangtute chu collapsible element ngeia direct-a kal theihna tur shortcut dang a pe a ni.
Collapse plugin hian heavy lifting handle turin class tlemte a hmang a:
.collapse
a thupui chu a thup thin.collapse.in
a thupui chu a entir a.collapsing
transition a tan hunah a dah belh a, a zawh chuan a paih leh bawkHeng class te hi component-animations.less
.
Element ah add data-toggle="collapse"
leh a data-target
tih mai la, collapsible element control chu automatic in a assign ang. Attribute hian data-target
collapse apply tur CSS selector a pawm a. collapse
Collapsible element ah hian class chu add ngei ngei tur a ni. Default open i duh chuan additional class kha add la in
.
Collapsible control-a accordion ang chi group management dah belh tur chuan data attribute data-parent="#selector"
. Hei hi action-a hmuh theih nan demo en rawh.
Manual hmangin enable theih a ni:
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-parent=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
nu leh pa | selector a ni | diklo | Selector pek a nih chuan he collapsible item hi a lan hunah parent tarlan hnuaia collapsible element zawng zawng chu khar vek a ni ang. panel (traditional accordion behavior nen a inang - hei hi class -ah a innghat ) |
toggle a ni | boolean a ni | dik | Invocation-ah collapsible element a toggle thin |
.collapse(options)
I content chu collapsible element angin a activate thin. A pawm a, optional options a awm object
bawk .
.collapse('toggle')
Collapsible element chu show emaw hidden emaw ah a toggle thin. Collapsible element chu a takin a lan hma emaw a thup hmain (chu chu shown.bs.collapse
or hidden.bs.collapse
event a thlen hmain) caller hnenah a kir leh thin.
.collapse('show')
Collapsible element a lantir. Collapsible element a lan tak tak hmain (chu chu shown.bs.collapse
event a thlen hmain) caller hnenah a kir leh thin.
.collapse('hide')
Collapsible element a thup thei. Collapsible element chu a takin a thup hmain (chu chu hidden.bs.collapse
event a thlen hmain) caller hnenah a kir leh thin.
Bootstrap-a collapse class hian collapse functionality-a hook theihna tur event tlemte a pholang a ni.
Thil thleng chi hrang hrang | Hrilhfiahna |
---|---|
show.bs.collapse tih a ni | show He event hi instance method kan koh chuan a fire nghal vek a ni. |
tih a ni.bs.collapse | He event hi collapse element pakhat user hmuh theiha siam a nih chuan fired a ni (CSS transition zawh hun a nghak ang). |
thup.bs.collapse tih hi a ni | hide He event hi method koh a nih chuan a fire nghal a ni. |
thup.bs.collapse tih a ni | He event hi user hnen atanga collapse element thup a nih chuan a fire thin (CSS transition zawh hun a nghak ang). |
Element hrang hranga cycle kal theihna tur slideshow component, carousel ang chi. Nested carousel te hi a support lo.
Carousel component hi a tlangpuiin accessibility standard a zawm lo. Compliant i mamawh chuan i content present dan tur dang ngaihtuah la.
Bootstrap hian a animation atan CSS3 chauh a hmang a, mahse Internet Explorer 8 & 9 hian CSS property mamawh a support lo. Chutiang chuan heng browser te hman lai hian slide transition animation a awm lo. Transition hrang hrangte tana jQuery-based fallbacks te dah tel loh tur hian tumruh takin kan rel a ni.
Class chu .active
slide pakhatah dah belh a ngai a ni. Chutiang a nih loh chuan carousel chu a lang lo ang.
Controls te tan chuan .glyphicon .glyphicon-chevron-left
and .glyphicon .glyphicon-chevron-right
class te hi a ngai hauh lo. Bootstrap hian a pe .icon-prev
a, .icon-next
plain unicode alternative angin a pe bawk.
I slide-ah awlsam takin caption dah la, .carousel-caption
element awmin any .item
. Chutah chuan optional HTML eng pawh dah la, automatic in a align leh format ang.
Carousel - te chu carousel control-te a thawh that theih nan id
on the outermost container (the ) hman a ngai a ni. .carousel
Carousel tam tak i dah belh hunah, emaw, carousel pakhat i thlak hunah emaw, a id
kaihhnawih controls te chu update ngei ang che.
Carousel awmna hmun awlsam taka control turin data attribute hmang rawh. data-slide
keywords prev
or next
, chu a pawm a, chu chuan slide awmna chu a awmna hmun nen khaikhin chuan a thlak danglam a ni. A dang pawhin, data-slide-to
raw slide index chu carousel-ah pass turin hmang la data-slide-to="2"
, chu chuan slide awmna chu index bik pakhatah a sawn a, chu chu 0
.
data-ride="carousel"
Attribute hi page load atanga tan carousel chu animating anga mark nan hman a ni . Carousel khata (redundant leh a tul lo) explicit JavaScript initialization nen hman dun theih a ni lo.
Carousel chu manual-in call la, hetiang hian:
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-interval=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
inkar a ni | a zat | 5000 a ni | Item pakhat automatic-a cycle-a tihkhawtlai hun chhung. Dik lo a nih chuan carousel hian automatic in a cycle dawn lo. |
chawl | string | engmah lo | "hover" tih a ni. | A set a nih chuan "hover" carousel on cycling chu a pause a, carousel on mouseenter cycling chu a chhunzawm leh mouseleave ang. -a dah a nih chuan null carousel chunga hovering hian a pause dawn lo. |
tuam | boolean a ni | dik | Carousel chu cycle chhunzawm zel tur nge hard stop neih tur tih. |
keyboard hmangin a ziak a | boolean a ni | dik | Keyboard thil thlengah carousel hian a chhan let tur em tih. |
.carousel(options)
Carousel chu optional options hmangin a initialize a, object
item hrang hrang hmangin cycle a kal tan thin.
.carousel('cycle')
Carousel thilte chu veilam atanga dinglam thlengin a cycle a.
.carousel('pause')
Carousel chu thil kal tlanga cycle a kal theih loh nan a titawp.
.carousel(number)
Carousel chu frame pakhatah a cycle (0 based, array ang chi).
.carousel('prev')
Item hmasa lam chu a cycle a.
.carousel('next')
Item dang lam pan chuan a cycle a.
Bootstrap-a carousel class hian carousel functionality-a hooking-na tur event pahnih a pholang a ni.
Event pahnih hian a hnuaia additional property te hi an nei vek a ni:
direction
: Carousel a tlan chhuahna lam (either "left"
or "right"
).relatedTarget
: Active item anga a hmuna slid tur DOM element.Carousel event zawng zawng hi carousel ngeiah (ie at the <div class="carousel">
).
Thil thleng chi hrang hrang | Hrilhfiahna |
---|---|
slide.bs.carousel a ni | He event hi slide instance method invoke a nih chuan a fire nghal vek a ni. |
slid.bs.carousel tih a ni | He event hi carousel-in a slide transition a zawh hunah a kah chhuak thin. |
Affix plugin position: fixed;
hian on leh off a toggle a, position: sticky;
. Dinglama subnavigation hi affix plugin live demo a ni.
Affix plugin hi data attribute hmangin emaw, mahni JavaScript hmangin manual-in emaw hmang ang che. Chutiang dinhmun pahnihah chuan i affixed content awmna tur leh a zau zawng tur CSS i pe tur a ni.
Note: Safari rendering bug avang hian element awmna element, pulled emaw pushed column ang chi element- ah affix plugin hi hmang suh
Affix plugin hian class pathum a toggle a, pakhatin state bik a entir a: .affix
, .affix-top
, leh .affix-bottom
. Heng class te tan hian style te chu i pe tur a ni a , position: fixed;
on tih loh chu .affix
nangmah ngeiin (he plugin atanga innghat lovin) position tak tak te chu i handle thei ang.
Affix plugin hnathawh dan chu hetiang hi a ni:
.affix-top
element chu a top-most position-ah a awm tih hriattir turin a belh a. Hetih lai hian CSS positioning a ngai lo..affix
replace .affix-top
leh set position: fixed;
(Bootstrap’s CSS atanga pek) awmna hmun a ni..affix
a .affix-bottom
ni. Offsets hi optional a nih avangin pakhat setting chuan CSS dik tak set a ngai a ni. Chutiang a nih position: absolute;
chuan a tul hunah add tur a ni. Plugin hian data attribute emaw JavaScript option emaw hmangin chuta tang chuan element chu khawiah nge a dah tur tih a hriat theih a ni.A chunga kan sawi ang hian i CSS chu a hnuaia usage option pahnih atan set rawh.
data-spy="affix"
Element eng pawha awlsam taka affix behavior dah tur chuan i spy duh element ah khan add mai tur a ni. Element pakhat pinning toggle hun tur sawifiah nan offsets hmang ang che.
JavaScript hmangin affix plugin chu call rawh:
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-offset-top="200"
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
offset a ni | number | hnathawh | thil | 10 a ni | Scroll awmna tur chhiar hunah screen atanga offset tur pixels te. Number pakhat pek a nih chuan offset chu a chung leh a hnuai lam zawng zawngah hman a ni ang. Unique, bottom leh top offset pek tur chuan object offset: { top: 10 } emaw offset: { top: 10, bottom: 5 } . Offset pakhat dynamically calculate i mamawh hunah function hmang ang che. |
tum bik | thlangtu | node | jQuery element a ni | thil window awmzia chu |
Affix-a target element a tarlang. |
.affix(options)
I content chu affixed content angin a activate thin. A pawm a, optional options a awm object
bawk .
.affix('checkPosition')
Affix dinhmun chu a kaihhnawih element hrang hrangte dimension, position leh scroll position hmangin a chhut nawn leh thin. , .affix
, .affix-top
leh .affix-bottom
class te chu state thar ang zelin affixed content-ah dah emaw, paih emaw a ni. Hetiang method hi affixed content emaw target element emaw dimensions tihdanglam apiangin koh a ngai a, chu chu affixed content awmna dik tak a nih theih nan a ni.
Bootstrap-a affix plugin hian affix functionality-a hook theihna tur event tlemte a pholang a ni.
Thil thleng chi hrang hrang | Hrilhfiahna |
---|---|
affix.bs.affix tih a ni | He event hi element affix hmain a kap nghal vek a ni. |
affix a ni.bs.affix tih a ni | He event hi element affix a nih hnuah fire a ni. |
affix-a chungah.bs.affix | He event hi element chu affix-top a nih hmain a kap nghal vek a ni. |
affix-a chung.bs.affix tih a ni | He event hi element chu affix-top a nih hnuah fire a ni. |
affix-a hnuai lam.bs.affix | He event hi element chu affixed-bottom a nih hmain a kap nghal vek a ni. |
affixed-a hnuai lam.bs.affix | He event hi element chu affix-bottom a nih hnuah fire a ni. |