Weta ngwa Bootstrap na ndụ-ugbu a nwere ngwa mgbakwunye jQuery omenala iri na abụọ .
A streamlined, mana mgbanwe, were na omenala javascript modal ngwa mgbakwunye na-eji naanị kacha nta chọrọ ọrụ na smart ndabara.
Tinye ndetu mwepu na ihe ọ bụla dị na Bootstrap na ngwa mgbakwunye a dị mfe. Bootstrap nwere nkwado menu ndetu zuru oke na navbar, taabụ na ọgwụ.
Jiri scrollspy ka imelite njikọ ndị dị na navbar gị ozugbo iji gosi njikọ na-arụ ọrụ ugbu a dabere na ọnọdụ mpịakọta.
Jiri ngwa mgbakwunye a mee ka taabụ na ọgwụ bara uru karịa site n'ikwe ka ha gbanwee site na pane nke ọdịnaya mpaghara.
Ihe ọhụrụ na-ewe na jQuery Tipsy ngwa mgbakwunye, Tooltips anaghị adabere na onyonyo-ha na-eji CSS3 maka animation na njirimara data maka nchekwa aha mpaghara.
Tinye obere ihe machie nke ọdịnaya, dị ka ndị dị na iPad, na ihe ọ bụla maka ozi nke abụọ nke ụlọ.
* Chọrọ ka gụnye ndụmọdụ ngwaọrụ
Ngwa mgbakwunye njikere bụ obere klaasị maka ịgbakwunye ọrụ nso na ọkwa.
Jiri bọtịnụ mee ihe ndị ọzọ. Bọtịnụ njikwa na-ekwu ma ọ bụ mepụta otu bọtịnụ maka ihe ndị ọzọ dị ka ogwe ngwaọrụ.
Nweta ụdị ntọala yana nkwado na-agbanwe agbanwe maka ihe ndị nwere ike imebi dị ka accordions na igodo.
Mepụta ọmarịcha ọdịnaya nke ọ bụla ịchọrọ ịnye ihe ngosi mmịfe nke ọdịnaya.
Ngwa mgbakwunye bụ isi, gbatịpụrụ ngwa ngwa maka imepụta ụdị ụdịdị mara mma na ntinye ederede ọ bụla.
Maka mmetụta mgbanwe dị mfe, gụnyere bootstrap-transition.js otu ugboro ka ịsime na modal ma ọ bụ kwụsịchaa ọkwa.
* Achọrọ maka animation na plugins
A streamlined, mana mgbanwe, were na omenala javascript modal ngwa mgbakwunye na-eji naanị kacha nta chọrọ ọrụ na smart ndabara.
Budata faịlụN'okpuru ebe a bụ modal atụgharịrị.
Otu anụ ahụ mara mma…
Gbanwee modal site na javascript site na ịpị bọtịnụ dị n'okpuru. Ọ ga-adaba ma daa site n'elu ibe ahụ.
Mwepụta ngosi modalKpọọ modal site na javascript:
- $ ( '#myModal' ). modal ( nhọrọ )
Aha | ụdị | ndabara | nkọwa |
---|---|---|---|
ndabere | boolean | eziokwu | Na-agụnye ihe modal-backdrop element. Nhọrọ, ezipụta static maka backdrop nke na-adịghị emechi modal na pịa. |
ahụigodo | boolean | eziokwu | Na-emechi modal mgbe ịpịrị igodo mgbapụ |
gosi | boolean | eziokwu | Na-egosi modal mgbe ebido ya. |
Ị nwere ike ịgbalite modals na ibe gị n'ụzọ dị mfe na-enweghị ide otu ahịrị javascript. Naanị tọọ data-toggle="modal"
ihe njikwa nwere data-target="#foo"
ma ọ bụ href="#foo"
nke dabara na id element element, ma mgbe ịpịrị ya, ọ ga-ebido modal gị.
Ọzọkwa, ka ịgbakwunye nhọrọ na ihe atụ modal gị, tinye naanị ha dị ka njirimara data agbakwunyere na ma ọ bụ ihe njikwa ma ọ bụ akara modal n'onwe ya.
- <a class = "btn" data-toggle = "modal" href = "#myModal" > Usoro mmalite </a>
- <div klas = "modal hide" id = "myModal" >
- <div class = "modal-header" >
- < ụdị bọtịnụ = "bọtịnụ" klaasị = "emechi" data-dismiss = "modal" > × </bọtịnụ>
- <h3> Ihe nkụnye eji isi mee </h3>
- </div>
- <div klas = "modal-body" >
- <p> Otu ahụ mara mma… </p>
- </div>
- <div class = "modal-footer" >
- <a href = "#" klas = "btn" data-dismiss = "modal" > Mechie </a>
- <a href = "#" klas = "btn btn-primary" > Chekwa mgbanwe </a>
- </div>
- </div>
.fade
klas na
.modal
mmewere ( rụtụ aka na ngosi iji hụ nke a na-arụ ọrụ) ma tinye bootstrap-transition.js.
Na-eme ka ọdịnaya gị rụọ ọrụ dị ka modal. Nabata nhọrọ nhọrọ object
.
- $ ( '#myModal' ). modal ({
- ahụigodo : ụgha
- })
Iji aka na-atụgharị modal.
- $ ( '#myModal' ). modal ( 'ntụgharị' )
Iji aka na-emepe modal.
- $ ( '#myModal' ). modal ( 'show' )
Iji aka na-ezo modal.
- $ ( '#myModal' ). modal ( 'zoo' )
Klas modal Bootstrap na-ekpughe ihe omume ole na ole maka ịbanye n'ime ọrụ modal.
Ihe omume | Nkọwa |
---|---|
gosi | Ihe omume a na-agba ọkụ ozugbo show a na-akpọ usoro ihe atụ. |
egosiri | A na-achụpụ ihe omume a mgbe onye ọrụ mere ka modal ahụ anya (ga-echere ntụgharị css ka agwụchaa). |
zoo | A na-agbapụ ihe omume a ozugbo hide a kpọrọ usoro ihe atụ. |
zoro ezo | A na-achụpụ ihe omume a mgbe ezoro ezoro ya n'aka onye ọrụ modal (ga-echere mgbanwe css iji wuchaa). |
- $ ( '#myModal' ). na ( 'zoro ezo' , ọrụ () {
- // mee ihe…
- })
Tinye ndetu mwepu na ihe ọ bụla dị na Bootstrap na ngwa mgbakwunye a dị mfe. Bootstrap nwere nkwado menu ndetu zuru oke na navbar, taabụ na ọgwụ.
Budata faịlụPịa na njikọ nke dropdown navbar na ọgwụ ndị dị n'okpuru iji nwalee ọdịda.
Kpọọ dropdowns site na javascript:
- $ ( '.dropdown-toggle' ). dropdown ()
Ka ịgbakwunye ọrụ ndọda ngwa ngwa na mmewere ọ bụla tinye naanị data-toggle="dropdown"
na ntinye bootstrap ọ bụla dị mma ga-arụ ọrụ ozugbo.
data-target="#fat"
ma ọ bụ
href="#fat"
.
- <ul klas = "nav nav-pills" >
- <li class = "ọrụ" ><a href = "#" > Njikọ oge niile </a></li>
- <li klas = "mkpọda" id = "menu1" >
- <a class = "dropdown-toggle" data-toggle = "dobe" href = "#menu1" >
- Wedaa
- <b klas = "nlekọta" </b>
- </a>
- <ul klas = "ndropdown-menu" >
- <li><a href = "#" > Omume </a></li>
- <li><a href = "#" > Omume ọzọ </a></li>
- <li><a href = "#" > Ihe ọzọ ebe a </a></li>
- <li klas = "onye nkesa" </li>
- <li><a href = "#" > Njikọ ndị kewapụrụ </a></li>
- </ul>
- </li>
- ...
- </ul>
Iji dobe URL adịghị, jiri data-target
njirimara kama href="#"
.
- <ul klas = "nav nav-pills" >
- <li klas = "mkpọda" >
- <a class = "dropdown-toggle" data-toggle = "dropdown" data-target = "#" href = "ụzọ/to/peeji.html" >
- Wedaa
- <b klas = "nlekọta" </b>
- </a>
- <ul klas = "ndropdown-menu" >
- ...
- </ul>
- </li>
- </ul>
Api mmemme maka ime ka menus rụọ ọrụ maka ihe navbar enyere ma ọ bụ igodo taabụ.
Ihe mgbakwunye ScrollSpy bụ maka imelite ebumnuche nav na-akpaghị aka dabere na ọnọdụ mpịakọta.
Budata faịlụPịgharịa na mpaghara n'okpuru wee lelee mmelite nsoroụzọ. A ga-eme ka ọ pụta ìhè nke obere ihe ndọpụta. Gbalịa ya!
Ad leggings keytar, brunch id art party dolor labour. Pitchfork yr enim lo-fi tupu ha ere qui. Ikike igwe kwụ otu ebe Tumblr ugbo gaa na tebụl ihe ọ bụla. Anim keffiyeh carles cardigan. Ụlọ foto Velit seitan mcsweeney 3 wolf moon irure. Cosby sweta lomo jean shorts, williamsburg hoodie minim qui eleghị anya, ị nụbeghị banyere ha et cardigan Trust fund culpa biodiesel wes anderson aesthetic. Nihil egbugbu accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
Veniam marfa afụ ọnụ skateboard, adipisicing fugiat velit pitchfork afụ ọnụ. Freegan afụ ọnụ ma ọ bụ mcsweeney's vero. Cupidatat anọ ebe nisi, ma helvetica nulla carles. gwongworo nri cosby sweta egbugbu, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles na-adịghị mma mmega ahụ gentrify. Brooklyn adipisicing craft biya vice keytar deserunt.
Occaecat commodo aliqua delectus. Fap craft biya deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS kacha mma. Consectetur nisi DIY minim bag. Cred ex in, sustainable delectus consectetur 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 ozi akpa marfa ọ bụla delectus nri gwongworo. Sapiente synth id echere. Locavore sed helvetica cliche irony, thundercats eleghị anya ị nụbeghị banyere ha na-akpata hoodie gluten-free lo-fi fap aliquip. Ụlọ ọrụ dị elu tupu ha ere, Terry Richardson proident brunch nesciunt quis cosby sweta pariatur keffiyeh ut helvetica artisan. Cardigan craft biya seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
Kpọọ scrollspy site na javascript:
- $ ( '#navbar' ). scrollspy ()
Ka mfe tinye scrollspy omume gị topbar igodo, dị nnọọ tinye data-spy="scroll"
na mmewere ị chọrọ inyocha na (kasị a ga-abụ ahụ).
- <body data-spy = "mpịakọta" > ... </ body>
<a href="#home">home</a>
ga-ederịrị ihe n'ime ụlọ dịka
<div id="home"></div>
.
Mgbe ị na-eji scrollspy yana mgbakwunye ma ọ bụ wepụ ihe ndị sitere na DOM, ị ga-akpọ usoro ume ọhụrụ dị ka:
- $ ( '[data-spy="mpịakọta"]' ). nke ọ bụla ( ọrụ () {
- var $ nledo = $ ( nke a ). scrollspy ( 'refresh' )
- }
Aha | ụdị | ndabara | nkọwa |
---|---|---|---|
nkwụsị | nọmba | 10 | Pikselụ ka a ga-esi n'elu pụta mgbe ị na-agbakọ ọnọdụ mpịakọta. |
Ihe omume | Nkọwa |
---|---|
rụọ ọrụ | Ihe omume a na-agba ọkụ mgbe ọ bụla ihe ọhụrụ na-arụ ọrụ site na scrollspy. |
Ngwa mgbakwunye a na-agbakwunye ngwa ngwa taabụ na arụ ọrụ pill maka ịtụgharị site na ọdịnaya mpaghara.
Budata faịlụPịa taabụ dị n'okpuru ka ịgbanwee n'etiti pane zoro ezo, ọbụlagodi site na nchịkọta nhọrọ.
Raw denim eleghị anya ị nụbeghị maka ha jeans shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master sachapụ. Afụ ọnụ cliche tempor, williamsburg carles vegan helvetica. Reprehenderit onye na-egbu anụ retro keffiyeh dreamcatcher synth. Cosby sweta eu banh mi, qui irure terry richardson ex squid. Họrọ ebe salvia cillum iphone. Seitan aliquip quis cardigan uwe ndị America, anụ anụ voluptate bụ isi 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 tupu ha erere master cleanse gluten-free squid scenester freegan cosby sweta. Fanny pack portland seitan DIY, nka party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi tupu ha erere ugbo-na-tebulu VHS viral locavore cosby sweta. ꞌYị ga bɨ ṇguṇgunɨ́ ledre ꞌbɨ Lomo go, zɨ́a úku úku ledre zɨ́a útúásáne keffiye kị́éꞌdo kị́éꞌdo káa zɨ́ bɨlámáne. Wolf salvia freegan, sartorial keffiyeh echo park vegan.
Kwado taabụ tabbable site na javascript (taabụ ọ bụla kwesịrị ịgbalite n'otu n'otu):
- $ ( '#myTab a' ). pịa ( ọrụ ( e ) {
- e . mgbochiDedfault ();
- $ ( nke a ). tab ( 'show' );
- })
Ị nwere ike ịgbalite taabụ n'otu n'otu n'ụzọ dị iche iche:
- $ ( '#myTab a[href="#profile"]' ). tab ( 'show' ); // Họrọ taabụ n'aha
- $ ( '#myTab a: nke mbụ' ). tab ( 'show' ); // Họrọ taabụ mbụ
- $ ( '#myTab a: ikpeazụ' ). tab ( 'show' ); // Họrọ taabụ ikpeazụ
- $ ( '#myTab li: eq(2) a' ). tab ( 'show' ); // Họrọ taabụ nke atọ (0-indexed)
Ị nwere ike ịgbalite taabụ ma ọ bụ pill navigation na-edeghị Javascript ọ bụla site na ịkọwapụta data-toggle="tab"
ma ọ bụ data-toggle="pill"
na mmewere. Ịtinye nav
na nav-tabs
klaasị na taabụ ul
ahụ ga-etinye nhazi taabụ bootstrap.
- <ul klas = "nav nav-tabs" >
- <li><a href = "#home" data-toggle = "taabụ" > Ụlọ </a></li>
- <li><a href = "#profile" data-toggle = "taabụ" > Profaịlụ </a></li>
- <li><a href = "#messages" data-toggle = "taabụ" > Ozi </a></li>
- <li><a href = "#settings" data-toggle = "taabụ" > Ntọala </a></li>
- </ul>
Na-arụ ọrụ mmemme taabụ na akpa ọdịnaya. Tab kwesịrị inwe ma ọ data-target
bụ ihe href
ezubere iche maka ọnụ akpa na DOM.
- <ul klas = "nav nav-tabs" id = "myTab" >
- <li class = "ọrụ" ><a href = "#ụlọ" > Ụlọ </a></li>
- <li><a href = "#profile" > Profaịlụ </a></li>
- <li><a href = "#messages" > Ozi </a></li>
- <li><a href = "#settings" > Ntọala </a></li>
- </ul>
- <div class = "taabụ-ọdịnaya" >
- <div class = "tab-pane active" id = "ụlọ" > ... </div>
- <div class = "tab-pane" id = "profaịlụ" > ... </div>
- <div class = "tab-pane" id = "ozi" > ... </div>
- <div class = "tab-pane" id = "ntọala" > ... </div>
- </div>
- <edemede>
- $ ( ọrụ () {
- $ ( '#myTab a: ikpeazụ' ). tab ( 'show' );
- })
- </script>
Ihe omume | Nkọwa |
---|---|
gosi | Ihe omume a na-agba ọkụ na ihe ngosi taabụ, mana tupu egosiri taabụ ọhụrụ. Jiri event.target ma event.relatedTarget tụọ taabụ nọ n'ọrụ yana taabụ arụ ọrụ gara aga (ọ bụrụ na ọ dị) n'otu n'otu. |
egosiri | Ihe omume a na-agba ọkụ na ihe ngosi taabụ ka egosiri taabụ. Jiri event.target ma event.relatedTarget tụọ taabụ nọ n'ọrụ yana taabụ arụ ọrụ gara aga (ọ bụrụ na ọ dị) n'otu n'otu. |
- $ ( 'a[data-toggle = "taabụ"]' ). na ( 'gosiri' , ọrụ ( e ) {
- e . target // taabụ arụ ọrụ
- e . metụtaraTarget // taabụ gara aga
- })
Site na ngwa mgbakwunye jQuery.tipsy mara mma nke Jason Frame dere; Ntuziaka ngwaọrụ bụ ụdị emelitere, nke na-adabereghị na onyonyo, jiri css3 maka eserese, yana njirimara data maka nchekwa aha mpaghara.
Budata faịlụGaa na njikọ dị n'okpuru ka ịhụ ndụmọdụ ndụmọdụ:
Ọkpa ogologo ọkpa next level keffiyeh eleghị anya ị nụbeghị maka ha. Foto ụlọ afụ ọnụ raw denim akwụkwọ ozi vegan messenger akpa stumptown. Ugbo-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit American uwe nwere Terry Richardson vinyl chambray. Ogige ajị agba, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, anọ loko mcsweeney si sachaa vegan chambray. A really ironic artisan whatever keytar , scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.
Mepụta ngwa ngwa site na javascript:
- $ ( '#ihe atụ' ). Tooltip ( nhọrọ )
Aha | ụdị | ndabara | nkọwa |
---|---|---|---|
animation | boolean | eziokwu | tinye mgbanwe css fade na ngwungwu ngwaọrụ |
ntinye | eriri | ọrụ | 'n'elu' | otu esi edobe ngwa ọrụ - top | ala | aka ekpe | nri |
onye nhọpụta | eriri | ụgha | Ọ bụrụ na enyere onye nhọpụta, a ga-ekenye ihe nrịbama ngwaọrụ na ebumnuche ndị akọwapụtara. |
aha | eriri | ọrụ | '' | Uru aha ndabara ma ọ bụrụ na mkpado 'aha' adịghị |
ịkpalite | eriri | 'hover' | otú Tooltip si akpalite - hover | lekwasịrị anya | akwụkwọ ntuziaka |
igbu oge | nọmba | ihe | 0 | igbu oge igosi na izobe ngwa ọrụ (ms) - anaghị emetụta ụdị mkpali aka Ọ bụrụ na ewepụtara nọmba, a na-etinye igbu oge na ma zoo/egosi Nhazi ihe bụ: |
Maka ebumnuche arụmọrụ, Tooltip na Popover data-apis abanyela. Ọ bụrụ na ịchọrọ iji ha naanị ezipụta nhọrọ nhọrọ.
- <a href = "#" rel = "tooltip" aha = "ngwaọrụ izizi" > fesa m </a>
Na-ejikọta onye na-ahụ maka ndụmọdụ ngwaọrụ na mkpokọta mmewere.
Na-ekpughe ngwa ọrụ mmewere.
- $ ( '# element' ). Tooltip ( 'show' )
Na-ezobe ntụaka ngwa ọrụ mmewere.
- $ ( '# element' ). Tooltip ( 'zoo' )
Na-atụgharị ihe ntụnye aka nke mmewere.
- $ ( '# element' ). Tooltip ( 'ntụgharị' )
Tinye obere ihe machie nke ọdịnaya, dị ka ndị dị na iPad, na ihe ọ bụla maka ozi nke abụọ nke ụlọ.
* Achọrọ ka etinyere ndụmọdụ ngwaọrụ
Budata faịlụChekwaa n'elu bọtịnụ iji kpalite popover.
Kwado popovers site na javascript:
- $ ( '#ihe atụ' ). popover ( nhọrọ )
Aha | ụdị | ndabara | nkọwa |
---|---|---|---|
animation | boolean | eziokwu | tinye mgbanwe css fade na ngwungwu ngwaọrụ |
ntinye | eriri | ọrụ | 'ziri ezi' | otu esi etinye popover - top | ala | aka ekpe | nri |
onye nhọpụta | eriri | ụgha | ọ bụrụ na enyere onye nhọpụta, a ga-ekenye ihe ndị ahọpụtara ngwaọrụ na ebumnuche ndị akọwapụtara |
ịkpalite | eriri | 'hover' | otú Tooltip si akpalite - hover | lekwasịrị anya | akwụkwọ ntuziaka |
aha | eriri | ọrụ | '' | Uru aha ndabara ma ọ bụrụ na àgwà 'aha' adịghị |
ọdịnaya | eriri | ọrụ | '' | uru ọdịnaya ndabara ma ọ bụrụ na njirimara 'data-content' adịghị |
igbu oge | nọmba | ihe | 0 | igbu oge igosi na izobe popover (ms) - anaghị etinye aka na ụdị mkpalite aka Ọ bụrụ na ewepụtara nọmba, a na-etinye igbu oge na ma zoo/egosi Nhazi ihe bụ: |
Maka ebumnuche arụmọrụ, Tooltip na Popover data-apis abanyela. Ọ bụrụ na ịchọrọ iji ha naanị ezipụta nhọrọ nhọrọ.
Na-ebute popovers maka mkpokọta mmewere.
Na-ekpughe ihe ngosi popover.
- $ ( '# element' ). popover ( 'show' )
Na-ezobe ihe nchacha mmapụta.
- $ ( '# element' ). popover ( 'zoo' )
Na-atụgharị ihe ndị mejupụtara popover.
- $ ( '# element' ). popover ( 'ntụgharị' )
Ngwa mgbakwunye nke alerts na-arụ ọrụ na ozi ọbịbịa mgbe niile, ma gbochie ozi.
Gbanwee nke a na nke ahụ wee nwaa ọzọ. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.
Kwado ịchụpụ ọkwa site na javascript:
- $ ( ".ọhụụ" ). njikere ()
Naanị tinye data-dismiss="alert"
na bọtịnụ mmechi gị iji nye ọrụ nso nsonye na-akpaghị aka.
- <a class = "emechi" data-dismiss = "alert" href = "#" > & ugboro; </a>
Na-eji arụ ọrụ nso kechie ọkwa niile. Iji mee ka ọkwa gị dị ndụ mgbe emechiri emechi, gbaa mbọ hụ na ha etinyelarị ya .fade
na .in
klas ahụ.
Na-emechi mkpu.
- $ ( ".ọhụụ" ). njikere ( 'emechi' )
Klas njikere Bootstrap na-ekpughe ihe omume ole na ole maka ịbanye n'ime ọrụ njikere.
Ihe omume | Nkọwa |
---|---|
nso | Ihe omume a na-agba ọkụ ozugbo close a na-akpọ usoro ihe atụ. |
mechiri emechi | A na-achụpụ ihe omume a mgbe emechiela njikere (ga-echere mgbanwe css ka ọ mezue). |
- $ ( '#my-alert' ). kechie ( 'emechi' , ọrụ () {
- // mee ihe…
- })
Nweta ụdị ntọala yana nkwado na-agbanwe agbanwe maka ihe ndị nwere ike imebi dị ka accordions na igodo.
Budata faịlụ* Achọrọ ka etinyere ngwa mgbakwunye Transitions.
N'iji ngwa mgbakwunye ọdịda, anyị wuru wijetị ụdị accordion dị mfe:
Kwado site na javascript:
- $ ( ".dakpọ" ). daa ()
Aha | ụdị | ndabara | nkọwa |
---|---|---|---|
nne na nna | onye nhọpụta | ụgha | Ọ bụrụ na ahọpụtara, a ga-emechi ihe niile ga-adakpọ n'okpuru nne na nna akọwapụtara mgbe egosiri ihe a nwere ike ịdaba. (yiri omume accordion omenala) |
tụgharịa | boolean | eziokwu | Na-atụgharị ihe nwere ike ịdaba na oku |
Naanị tinye data-toggle="collapse"
na a data-target
na mmewere iji nye njikwa nke mmewere nwere ike ịdaba na-akpaghị aka. Àgwà ahụ data-target
na-anabata css ahọpụtara iji tinye ọdịda ahụ. Jide n'aka na ịtinye klas collapse
ahụ na mmewere nwere ike ịdaba. Ọ bụrụ na ị ga-achọ ka ọ meghee, tinye klaasị agbakwunyere in
.
- <button class = "btn btn-danger" data-toggle = "dalata" data-target = "#demo" >
- mfe ndakpọ
- </bọtịnụ>
- <div id = "demo" klaasị = "daba n'ime" > … </div>
data-parent="#selector"
. Rụtụ aka na ngosi ngosi ka ịhụ nke a na-arụ ọrụ.
Na-eme ka ọdịnaya gị rụọ ọrụ ka ihe nwere ike imebi. Nabata nhọrọ nhọrọ object
.
- $ ( '#myCollapsible' ). daa ({
- toggle : ụgha
- })
Na-atụgharị ihe nwere ike ịdaba ka egosiri ma ọ bụ zoo.
Na-egosi mmewere nwere ike ịdaba.
Na-ezobe mmewere nwere ike ịdaba.
Klas ndakpọ Bootstrap na-ekpughe ihe omume ole na ole maka itinye aka n'ọrụ ọdịda.
Ihe omume | Nkọwa |
---|---|
gosi | Ihe omume a na-agba ọkụ ozugbo show a na-akpọ usoro ihe atụ. |
egosiri | A na-agbanyụ mmemme a mgbe onye ọrụ mere ka ihe ndakpọ pụtara (ga-echere ntụgharị css ka agwụchaa). |
zoo | A na-agbapụ ihe omume a ozugbo mgbe hide a na-akpọ usoro ahụ. |
zoro ezo | A na-agbanyụ mmemme a mgbe ezonarila ihe ndakpọ n'aka onye ọrụ (ga-echere ntụgharị css ka emechaa). |
- $ ( '#myCollapsible' ). na ( 'zoro ezo' , ọrụ () {
- // mee ihe…
- })
Lelee ihe ngosi mmịfe n'okpuru.
Kpọọ site na javascript:
- $ ( '.carousel' ). carousel ()
Aha | ụdị | ndabara | nkọwa |
---|---|---|---|
etiti oge | nọmba | 5000 | Ogologo oge igbu oge n'etiti ịnya igwe na-akpaghị aka. Ọ bụrụ na ụgha, carousel agaghị agba okirikiri na-akpaghị aka. |
kwụsịtụ | eriri | "hover" | Na-akwụsị ịgba ígwè nke carousel na mouseenter ma maliteghachi ịgba ígwè nke carousel na leave òké. |
A na-eji njirimara data maka njikwa gara aga na nke na-esote. Lelee akara ngosi ihe atụ n'okpuru.
- <div id = "myCarousel" klas = "carousel slide" >
- <!-- Ihe carousel -->
- <div klas = "carousel-inner" >
- <div class = "ihe na-arụ ọrụ" > … </div>
- <div class = "ihe" > … </div>
- <div class = "ihe" > … </div>
- </div>
- <!-- Carousel nav -->
- <a class = "carousel-control left" href = "#myCarousel" data-slide = "prev" > ‹ </a>
- <a class = "carousel-control right" href = "#myCarousel" data-slide = "na-esote" > & rsaquo; </a>
- </div>
Na-ebute carousel na nhọrọ nhọrọ object
wee malite ịnya igwe site na ihe.
- $ ( '.carousel' ). carousel ({
- Ogologo oge : 2000
- })
Na-agagharị na ihe carousel site n'aka ekpe gaa n'aka nri.
Na-akwụsị carousel site n'ịgba ígwè na ihe.
Na-eme okirikiri carousel gaa n'otu etiti (0 dabere, yiri n'usoro).
Ọkpụkpụ gaa na ihe gara aga.
Chọgharịa gaa na ihe na-esote.
Klas carousel Bootstrap na-ekpughe ihe omume abụọ maka itinye aka na ọrụ carousel.
Ihe omume | Nkọwa |
---|---|
slide | Ihe omume a na-agba ọkụ ozugbo slide a kpọkuru usoro ihe atụ. |
slide | A na-agbapụ ihe omume a mgbe carousel gwụchara mgbanwe slide ya. |
Ngwa mgbakwunye bụ isi, gbatịpụrụ ngwa ngwa maka imepụta ụdị ụdịdị mara mma na ntinye ederede ọ bụla.
Budata faịlụMalite pịnye n'ọhịa dị n'okpuru iji gosi nsonaazụ typehead.
Kpọọ typeahead site na javascript:
- $ ( '.typehead' ). typeahead ()
Aha | ụdị | ndabara | nkọwa |
---|---|---|---|
isi iyi | n'usoro | [] | Isi mmalite data iji jụọ ajụjụ megide. |
ihe | nọmba | 8 | Ọnụ ọgụgụ kacha elu nke ihe ga-egosipụta na ndọpụta. |
onye nkwutọ | ọrụ | ikpe enweghị mmetụta | Usoro eji achọpụta ma ajụjụ ọ dabara otu ihe. Nabata otu arụmụka, item nke a ga-anwale ajụjụ a. Nweta ajụjụ ugbu a na this.query . Weghachite boolean true ma ọ bụrụ na ajụjụ bụ egwuregwu. |
nhazi | ọrụ | kpomkwem egwuregwu, ikpe nwere mmetụta, enweghị mmetụta |
Usoro eji hazie nsonaazụ akpaaka. Nabata otu arụmụka items ma nwee oke nke ihe atụ typeahead. Tụtụ aka n'ajụjụ dị ugbu a na this.query . |
highlighter | ọrụ | na-akọwapụta egwuregwu ndabara niile | Usoro eji eme ka ọ pụta ìhè nsonaazụ akpaaka. Nabata otu arụmụka item ma nwee oke nke ihe atụ typeahead. Kwesịrị ịlaghachi html. |
Tinye njirimara data ka ịdebanye aha ihe nwere ọrụ typeahead.
- < ụdị ntinye = "ederede" data-provide = "ụdị isi" >
Na-ebute ntinye n'isi n'isi.