Na Bootstrap ƒe akpawo nagbɔ agbe—fifia kple jQuery ƒe kpeɖeŋutɔ 13 siwo wowɔ ɖe ɖoɖo nu.
Woateŋu ade plugins ɖekaɖeka (togbɔ be ɖewo bia be woanɔ te ɖe wo dzi hã), alo wo katã zi ɖeka. Bootstrap.js kple bootstrap.min.js siaa me plugins katã le faɛl ɖeka me.
Àteŋu azã Bootstrap ƒe kpeɖeŋutɔwo katã to dzeside API la dzi ko evɔ maŋlɔ JavaScript ƒe fli ɖeka pɛ hã o. Esia nye Bootstrap ƒe API ƒe klass gbãtɔ eye ele be wòanye wò susu gbãtɔ ne èle plugin zãm.
Ne míegblɔe alea la, le nɔnɔme aɖewo me la, ate ŋu anyo be woatsi dɔwɔnu sia. Eyata míena ŋutete hã be míawɔ nyatakaka nɔnɔme API la nuwɔametɔe to nudzɔdzɔwo katã ɖeɖeɖa le ŋutilã ƒe ŋkɔ dometsotso kple `'data-api'` dzi. Esia le abe alea ene:
- $ ( 'ŋutilã' ). off ( '.nyatakaka-api' ) .
Alo, be nàɖo taɖodzinu na plugin aɖe koŋ la, ɖeko nàde plugin la ƒe ŋkɔ abe ŋkɔteƒe ene kpe ɖe data-api ŋkɔteƒe ŋu abe esia ene:
- $ ( 'ŋutilã' ). off ( '.nuxlɔ̃ame.nyatakaka-api' ) .
Míexɔe se hã be ele be nàte ŋu azã Bootstrap ƒe kpeɖeŋutɔwo katã to JavaScript API dzi ko. Dutoƒo APIwo katã nye mɔnu ɖeka, siwo ŋu kɔsɔkɔsɔ le, eye wogbugbɔa nuƒoƒoƒu si dzi wowɔ dɔ ɖo la trɔna.
- $ ( ".btn.afɔku" ). button ( "trɔ asi le eŋu" ). addClass ( "ami ƒe ami" ) .
Ele be mɔnuwo katã naxɔ tiatiawɔblɔɖe ƒe nu, ka si woɖo taɖodzinu na mɔnu aɖe koŋ, alo naneke o (si dzea kpeɖeŋutɔ gɔme kple nuwɔna si woɖo ɖi):
- $ ( "#nyeModal" ). modal () // dze egɔme kple defaults
- $ ( "#nyeModal" ). modal ({ keyboard : alakpa }) // wodze egɔme kple keyboard aɖeke o
- $ ( "#nyeModal" ). modal ( 'show' ) // dzea egɔme eye wòyɔa ɖeɖefia enumake
Plugin ɖesiaɖe hã ɖea eƒe raw constructor ɖe go le `Constructor` ƒe nɔnɔme dzi: $.fn.popover.Constructor
. Ne èdi be yeaxɔ plugin ƒe kpɔɖeŋu aɖe koŋ la, xɔe tẽ tso element aɖe me: $('[rel=popover]').data('popover')
.
Ɣeaɖewoɣi la, ehiãna be woazã Bootstrap ƒe kpeɖeŋutɔwo kple UI ƒe ɖoɖo bubuwo. Le nɔnɔme siawo me la, ŋkɔteƒewo ƒe gododo ate ŋu adzɔ ɣeaɖewoɣi. Ne esia dzɔ la, àte ŋu ayɔ .noConflict
plugin si nèdi be yeatrɔ asi le eƒe asixɔxɔ ŋu.
- var bootstrap ƒe abɔta = $ . fn . ƒe dzesi . noConflict () // trɔ $.fn.button ɖe asixɔxɔ si wode asi na va yi la me
- $ . fn . bootstrapBtn = bootstrapButton // na $().bootstrapBtn bootstrap ƒe dɔwɔwɔ
Bootstrap naa nudzɔdzɔ tɔxɛwo na plugin ƒe nuwɔna tɔxɛ akpa gãtɔ. Zi geɖe la, esiawo va le nyagbemanɔsitɔ kple nyagbe si va yi ƒe nɔnɔme me - afisi wodzea nyagbe (ex. show
) gɔme le nudzɔdzɔ aɖe ƒe gɔmedzedze, eye eƒe akpa si va yi ƒe nɔnɔme (ex. shown
) nyea nusi dzea egɔme le nuwɔna aɖe ƒe nuwuwu.
Nudzɔdzɔ siwo katã me seɖoƒe meli na o naa preventDefault ƒe dɔwɔwɔ. Esia naa ŋutete be woatɔ te nuwɔna aɖe wɔwɔ hafi wòadze egɔme.
- $ ( '#nyeModal' ). on ( 'ɖee fia' , dɔwɔwɔ ( e ) { .
- ne (! data ) trɔ gbɔ e . preventDefault () // tɔ te modal ƒe ɖeɖefia
- }) ƒe .
Ne èdi tɔtrɔ ƒe ŋusẽkpɔɖeamedzi bɔbɔewo la, tsɔ bootstrap-transition.js kpe ɖe JS faɛl bubuawo ŋu zi ɖeka. Ne èle bootstrap.js si woƒo ƒu (alo woɖe edzi) zãm la , mehiã be nàde esia eme o—ele afima xoxo.
Trɔtrɔ ƒe kpeɖeŋutɔ ƒe kpɔɖeŋu ʋee aɖewo:
Modals nye streamlined, gake woateŋu atrɔ asi le, dzeɖoɖo ƒe nyabiasewo kple dɔwɔwɔ suetɔ kekeake si hiã kple smart defaults.
Modal si woɖe gɔme kple ta, ŋutilã, kple nuwɔna ƒe ƒuƒoƒo le afɔti me.
Ŋutilã nyui ɖeka...
- <div klass = "modal ɣla fade" >
- <div klass = "modal-tanya" >
- <bɔt ƒomevi = "bɔt" klass = "tu" data-dismiss = "modal" aria-ɣla = "nyateƒe" > &ɣeyiɣiwo; </button> ƒe dzesi
- <h3> Modal ƒe tanya </h3>
- </div> ƒe nyawo
- <div klass = "modal-ŋutilã" >
- <p> Ŋutilã nyui ɖeka... </p>
- </div> ƒe nyawo
- <div klass = "modal-afɔdzideƒe" >
- <a href = "#" klass = "btn" > Kpe </a>
- <a href = "#" class = "btn btn-primary" > Dzra tɔtrɔwo ɖo </a>
- </div> ƒe nyawo
- </div> ƒe nyawo
Trɔ modal aɖe to JavaScript dzi to asiƒoƒo ɖe dzesi si le ete la dzi. Aɖiɖi ɖe anyi eye wòaɖiɖi tso axaa tame.
- <!-- Abɔta si aʋã modal -->
- <a href = "#myModal" role = "button" class = "btn" data-toggle = "modal" > Dze wɔwɔfia ƒe nɔnɔme gɔme </a>
- <!-- Modal -->
- <div id = "nyeModal" klass = "modal ɣla fade" tabindex = "-1" akpa = "nyatakaka" aria-labelledby = "nyeModalLabel" aria-ɣla = "nyateƒe" >
- <div klass = "modal-tanya" >
- <bɔt ƒomevi = "bɔt" klass = "tu" data-dismiss = "modal" aria-ɣla = "nyateƒe" > × </button>
- <h3 id = "myModalLabel" > Mɔnu ƒe tanya </h3>
- </div> ƒe nyawo
- <div klass = "modal-ŋutilã" >
- <p> Ŋutilã nyui ɖeka... </p>
- </div> ƒe nyawo
- <div klass = "modal-afɔdzideƒe" >
- <button class = "btn" data- dismiss = "modal" aria-ɣla = "nyateƒe" > Tu </button>
- <button class = "btn btn-primary" > Dzra tɔtrɔwo ɖo </button>
- </div> ƒe nyawo
- </div> ƒe nyawo
Wɔ modal aɖe ŋudɔ JavaScript maŋlɔ o. Ðoe data-toggle="modal"
ɖe dziɖunu ƒe akpa aɖe dzi, abe abɔta ene, kpakple data-target="#foo"
alo href="#foo"
be nàɖo taɖodzinu na modal aɖe koŋ be wòatrɔ.
- <button type = "button" data-toggle = "modal" nyatakaka-taɖodzinu = "#myModal" > Dze modal </button> gɔme
Yɔ modal si si id myModal
le kple JavaScript ƒe fli ɖeka:
- $ ( '#nyeModal' ). modal ( tiatiawɔblɔɖewo ) .
Woateŋu atsɔ tiatiawɔblɔɖewo ato nyatakaka ƒe nɔnɔmewo alo JavaScript dzi. Le nyatakaka ƒe nɔnɔmewo gome la, tsɔ tiatia ƒe ŋkɔ kpe ɖe data-
, abe alesi wòle le data-backdrop=""
.
Ŋkɔ | ƒomevi | gᴐmedzeƒe | nuɖᴐɖᴐ |
---|---|---|---|
megbenyawo | boolean ƒe ƒuƒoƒo | nyateƒe | Modal-backdrop ƒe akpa aɖe hã le eme. Alo, gblɔ static na megbenya si metua modal le ʋuʋu dzi o. |
keyboard dzi | boolean ƒe ƒuƒoƒo | nyateƒe | Doa modal la ne wozi escape key dzi |
ɖe fia | boolean ƒe ƒuƒoƒo | nyateƒe | Fia modal la ne wodze egɔme. |
si gbɔ dzi dzi | afᴐmᴐ | alakpa | Ne wotsɔ url si le didiƒe na la, woatsɔ nyatakakawo ade jQuery ƒe
|
Ewɔa wò nyatakakawo ŋudɔ abe modal ene. Lɔ̃ ɖe tiatia siwo woate ŋu awɔ le wo ɖokui si dzi object
.
- $ ( '#nyeModal' ). modal ({ ) .
- keyboard : alakpa
- }) ƒe .
Asitɔtrɔ le modal aɖe ŋu.
- $ ( '#nyeModal' ). modal ( 'trɔ asi le eŋu' ) .
Eʋua modal aɖe kple asi.
- $ ( '#nyeModal' ). modal ( 'ɖee fia' ) .
Asi ɣlaa modal aɖe.
- $ ( '#nyeModal' ). modal ( 'ɣla' ) .
Bootstrap ƒe modal klass ɖea nudzɔdzɔ ʋee aɖewo ɖe go na hooking ɖe modal dɔwɔwɔ me.
Nudzᴐdzᴐ | Nuɖᴐɖᴐ |
---|---|
ɖe fia | Nudzɔdzɔ sia doa dzo enumake ne woyɔ show kpɔɖeŋu mɔnu la. |
woɖee fia | Woɖea nudzɔdzɔ sia ne wowɔ modal la be wòadze na zãla (alala be css ƒe tɔtrɔwo nawu enu). |
be | Woɖea nudzɔdzɔ sia ɖa enumake ne woyɔ hide instance mɔnu la. |
si le ɣaɣlame | Woɖea nudzɔdzɔ sia ne modal la ɣla ɖe zãla la vɔ (alala be css ƒe tɔtrɔwo nawu enu). |
- $ ( '#nyeModal' ). on ( 'ɣla' , dɔwɔwɔ () { .
- // wɔ nane...
- }) ƒe .
Tsɔ nuɖuɖu siwo le tsia dzi kpe ɖe nusianu kloe ŋu kple kpeɖeŋutɔ bɔbɔe sia, siwo dometɔ aɖewoe nye navbar, tabs, kple pills.
Tsɔe kpe data-toggle="dropdown"
ɖe kadodo alo abɔta ŋu be nàtrɔ asi le nya aɖe ŋu.
- <div klass = "nusiwo le tsia dzi" >
- <a class = "dropdown-toggle" data-toggle = "dropdown" href = "#" > Nusi wotsɔna tsia dzodzodzoetsitsi nu </a>
- <ul klass = "dropdown-menu" akpa = "menu" aria-labelledby = "dLabel" >
- ...
- </ul> ƒe nyawo
- </div> ƒe nyawo
Be URL-wo nanɔ anyi nyuie la, zã data-target
nɔnɔmea ɖe href="#"
.
- <div klass = "nusiwo le tsia dzi" >
- <a class = "ɖiɖi-ɖe-taɖodzinu" id = "dLabel" akpa = "button" nyatakaka-trɔtrɔ = "ɖiɖi" nyatakaka-taɖodzinu = "#" href = "/axa.html" >
- Nusiwo wotsɔna ƒua gbe
- <b klass = "dzikpɔkpɔ" ></b>
- </a>
- <ul klass = "dropdown-menu" akpa = "menu" aria-labelledby = "dLabel" >
- ...
- </ul> ƒe nyawo
- </div> ƒe nyawo
Yɔ nusiwo le fli dzi la to JavaScript dzi:
- $ ( '.dropdown-trɔtrɔ' ). si le fli dzi () .
Ɖeke o
Programmatic api na toggling menus na navbar alo tabbed navigation si wona.
ScrollSpy ƒe kpeɖeŋutɔa nye na nav taɖodzinuwo ƒe asitɔtrɔ le eɖokui si le agbalẽxatsaxatsa ƒe nɔƒe nu. Ʋu teƒe si le navbar la te eye nàkpɔ klass si le dɔ wɔm ƒe tɔtrɔ. Woade dzesi nu sue siwo le fli dzi la hã.
Ad leggings keytar, brunch id nutata kplɔ̃ɖoƒe dolor labore. Pitchfork yr enim lo-fi hafi wodzra qui. Tumblr agble-to-kplɔ̃ kekefɔkpa ƒe gomenɔamesiwo nusianu. Anim keffiyeh carles ƒe lãgbalẽ. Velit seitan mcsweeney ƒe fotoɖeƒe 3 amegãxi ɣleti irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui ɖewohĩ mèse wo ŋkɔ kpɔ o et cardigan kakaɖedzi ga culpa biodiesel wes anderson atsyɔ̃ɖoɖo. Nihil tattooed accusamus, cred nukokoedonamela biodiesel keffiyeh aɖaŋudɔwɔla ullamco consequat.
Veniam marfa ƒe ɖaƒoƒo ƒe ɖaƒoƒo, adipisicing fugiat velit pitchfork ɖa. Freegan ɖa aliqua cupidat mcsweeney ƒe vero. Cupidatat ene loko nisi, ea helvetica nulla carles. Tattooed cosby sweater nuɖuɖu agbatsɔʋu, mcsweeney ƒe quis non freegan vinyl. Lo-fi wes anderson +1 ƒe awudodo. Carles non atsyɔ̃ɖoɖo ƒe kamedede quis gentrify. Brooklyn adipisicing asinudɔwɔwɔ biya vice keytar deserunt.
Occaecat ƒe lãgbalẽ si woyɔna be aliqua delectus. Fap asinudɔwɔwɔ biya deserunt skateboard ea. Lomo keke ƒe gomenɔamesiwo adipisicing banh mi, velit ea sunt kplɔe ɖo dzidzenu locavore ɖeka-dzɔtsoƒe kɔfi le magna veniam. Agbe kɔkɔ id vinyl, echo tsaɖibɔ consequat quis aliquip banh mi pitchfork. Vero VHS est amiɖeɖe ɖe lãme na ame. Consectetur nisi DIY minim dɔla ƒe akplo. Cred ex le, nusiwo li tegbee 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 dɔla kotoku marfa nusianu delectus nuɖuɖu agbatsɔʋu. Sapiente ƒe wɔwɔme id assumenda. Locavore sed helvetica cliche irony, dziɖegbewo ɖewohĩ mèse nu tso wo ŋu o consequat hoodie gluten-maɖemaɖe lo-fi fap aliquip. Labore elit placeat hafi wodzra vɔ, terry richardson proident brunch nesciunt quis cosby awudziwui pariatur keffiyeh ut helvetica aɖaŋudɔwɔla. Cardigan asinudɔwɔwɔ biya seitan dzadzraɖo velit. VHS chambray laboris nye ɣeyiɣi kpui aɖe ƒe veniam. Anim mollit minim commodo ullamco dziɖegbe ƒe avuwo.
Be nàtsɔ scrollspy nuwɔna akpe ɖe wò topbar navigation ŋu bɔbɔe la, ɖeko nàtsɔe akpe data-spy="scroll"
ɖe element si nèdi be yeatsa ŋku ŋu (zi geɖe la, esia anye ŋutilã la) eye data-target=".navbar"
nàtia nav si nàzã. Àdi be yeazã scrollspy kple .nav
akpa aɖe.
- <ŋutilã ƒe nyatakaka-ŋkutsala = "ʋu" nyatakaka-taɖodzinu = ".navbar" > ... </body>
Yɔ agbalẽxatsaxatsa la to JavaScript dzi:
- $ ( '#navbar' ). agbalẽxatsaxatsa () .
<a href="#home">home</a>
nasɔ kple nane si le dom la me abe
<div id="home"></div>
.
Ne èle scrollspy zãm kpe ɖe nusiwo wotsɔ kpe ɖe DOM ŋu alo wo ɖeɖe ɖa ŋu la, ahiã be nàyɔ gbugbɔgawɔ mɔnu la abe ale:
- $ ( '[nyatakaka-ŋkutsala="ʋuʋu"]' ). ɖesiaɖe ( dɔwɔwɔ () { .
- var $ ŋkutsala = $ ( esia ). scrollspy ( 'gbugbɔ' ) .
- });
Woateŋu atsɔ tiatiawɔblɔɖewo ato nyatakaka ƒe nɔnɔmewo alo JavaScript dzi. Le nyatakaka ƒe nɔnɔmewo gome la, tsɔ tiatia ƒe ŋkɔ kpe ɖe data-
, abe alesi wòle le data-offset=""
.
Ŋkɔ | ƒomevi | gᴐmedzeƒe | nuɖᴐɖᴐ |
---|---|---|---|
offset ƒe ƒuƒoƒo | xexlẽdzesi | 10 | Pixels siwo woatsɔ atso dzi ne wole akɔnta bum le agbalẽxatsaxatsa ƒe nɔƒe ŋu. |
Nudzᴐdzᴐ | Nuɖᴐɖᴐ |
---|---|
wɔ dɔ | Nudzɔdzɔ sia doa dzo ɣesiaɣi si agbalẽxatsaxatsa la va le nu yeye aɖe ŋu dɔ wɔm. |
Tsɔ tab ƒe dɔwɔwɔ kabakaba, si trɔna kpe ɖe eŋu be nàtrɔ to nutoa me nyatakakawo ƒe akpawo dzi, to menu siwo le tsia dzi gɔ̃ hã dzi.
Raw denim ɖewohĩ mèse wo ŋkɔ kpɔ o jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth aƒetɔ kɔklɔ. Aɖatsiwo ƒe nyagbɔgblɔ ɣeyiɣi kpui aɖe, williamsburg carles vegan helvetica. Reprehenderit lãwula retro keffiyeh drɔ̃ekukula synth. Cosby ƒe awudziwui eu banh mi, qui irure terry richardson ex squid. Aliquip placeat lãwo ƒe lãmesẽfefewɔlawo ƒe iphone. Seitan aliquip quis cardigan amerikatɔwo ƒe awudodo, lãwula 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.
Na tabbable tabs nawɔ dɔ to JavaScript dzi (ele be woawɔ tab ɖesiaɖe ŋudɔ ɖekaɖeka):
- $ ( '#nyeTab a' ). zi ( dɔwɔwɔ ( e ) ) { .
- e . xe mɔ ɖeDefault ();
- $ ( esia ). tab ( 'ɖee fia' );
- }) ƒe .
Àte ŋu awɔ tab ɖekaɖekawo ŋudɔ le mɔ vovovowo nu:
- $ ( '#nyeTab a[href="#nyatakakadzraɖoƒe"]' ). tab ( 'ɖee fia' ); // Tia tab le ŋkɔ nu
- $ ( '#nyeTab a:gbãtɔ' ). tab ( 'ɖee fia' ); // Tia tab gbãtɔ
- $ ( '#nyeTab a:mlɔetɔ' ). tab ( 'ɖee fia' ); // Tia tab mamlɛtɔ
- $ ( '# nyeTab li: eq (2) a' ). tab ( 'ɖee fia' ); // Tia tab etɔ̃lia (0-indexed) .
Àte ŋu awɔ tab alo pill navigation ŋudɔ JavaScript aɖeke maŋlɔ to element aɖe gbɔgblɔ data-toggle="tab"
alo ɖe edzi ko me. data-toggle="pill"
Ne ètsɔ nav
kple nav-tabs
klasswo kpe ɖe tab ul
la ŋu la, awɔ Bootstrap tab ƒe atsyã ŋudɔ.
- <ul klass = "nav nav-tabs" >
- <li><a href = "#aƒe" nyatakaka-trɔtrɔ = "tab" > Aƒe </a></li>
- <li><a href = "#nyatakakadzraɖoƒe" data-toggle = "tab" > Nɔnɔmetata </a></li>
- <li><a href = "#gbedasiwo" data-toggle = "tab" > Gbedasiwo </a></li>
- <li><a href = "#ɖoɖowo" data-toggle = "tab" > Ðoɖowo </a></li>
- </ul> ƒe nyawo
Ewɔa tab element kple emenyawo ƒe nugoe ŋudɔ. Ele be tab nanye a data-target
alo href
taɖodzinu si nye container node le DOM la me.
- <ul klass = "nav nav-tabs" id = "nyeTab" >
- <li klass = "dɔwɔwɔ" ><a href = "#aƒe" > Aƒe </a></li>
- <li><a href = "#nyatakakadzraɖoƒe" > Nɔnɔmetata </a></li>
- <li><a href = "#gbedasiwo" > Gbedasiwo </a></li>
- <li><a href = "#ɖoɖowo" > Ðoɖowo </a></li>
- </ul> ƒe nyawo
- <div klass = "tab-nyawo" >
- <div klass = "tab-pane le dɔ wɔm" id = "aƒe" > ... </div>
- <div klass = "tab-pane" id = "nɔnɔmetata" > ... </div>
- <div klass = "tab-pane" id = "gbedasiwo" > ... </div>
- <div klass = "tab-pane" id = "ɖoɖowo" > ... </div>
- </div> ƒe nyawo
- <ŋɔŋlɔdzesi>
- $ ( dɔwɔwɔ () { .
- $ ( '#nyeTab a:mlɔetɔ' ). tab ( 'ɖee fia' );
- }) ƒe .
- </script> ƒe nyawo
Nudzᴐdzᴐ | Nuɖᴐɖᴐ |
---|---|
ɖe fia | Nudzɔdzɔ sia dzona le tab show dzi, gake hafi woaɖe tab yeyea afia. Zã event.target kple event.relatedTarget nàtsɔ aɖo taɖodzinu na tab si le dɔ wɔm kple tab si le dɔ wɔm va yi (ne ele eme) ɖe wo nɔewo yome. |
woɖee fia | Nudzɔdzɔ sia dzona le tab ɖeɖefia me ne woɖe tab aɖe fia vɔ. Zã event.target kple event.relatedTarget nàtsɔ aɖo taɖodzinu na tab si le dɔ wɔm kple tab si le dɔ wɔm va yi (ne ele eme) ɖe wo nɔewo yome. |
- $ ( 'a [nyatakaka-trɔtrɔ="tab"]' ). on ( 'woɖee fia' , dɔwɔwɔ ( e ) { .
- e . taɖodzinu // tab si wowɔ dɔ le
- e . relatedTarget // tab si do ŋgɔ
- }) ƒe .
Wotsɔ jQuery.tipsy ƒe kpeɖeŋutɔ nyuitɔ kekeake si Jason Frame ŋlɔ la ʋãe; Dɔwɔnu ƒe aɖaŋuɖoɖowo nye tɔtrɔ yeye aɖe, si meɖoa ŋu ɖe nɔnɔmetatawo ŋu o, zãa CSS3 hena nɔnɔmetatawo, kple data-nɔnɔmewo hena teƒea ƒe tanyawo dzraɖoƒe.
Le dɔwɔwɔ ta la, dɔwɔnu ƒe aɖaŋuɖoɖo kple popover data-apis nye opt in, si fia be ele be wò ŋutɔ nàdze wo gɔme .
Tsɔ asi ɖo kadodo siwo le ete la dzi be nàkpɔ dɔwɔnu ƒe aɖaŋuɖoɖowo:
Tight pants next level keffiyeh ɖewohĩ mèse wo ŋkɔ kpɔ o. Fotoɖeƒe ɖaɖa raw denim letterpress vegan dɔla kotoku stumptown. Agble-to-kplɔ̃ seitan, mcsweeney ƒe fixie si li tegbee quinoa 8-bit american awuwo le terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo dziɖegbe ƒe avuwo. Tofu biodiesel williamsburg marfa, ene loko mcsweeney ƒe kɔ vegan chambray. A really ironic artisan whatever keytar , scenester agble-ɖe-kplɔ̃ banksy Austin twitter asi freegan cred raw denim ɖeka-dzɔtsoƒe kɔfi viral.
Ne èle dɔwɔnu ƒe aɖaŋuɖoɖowo kple popovers zãm kple Bootstrap ƒe nyawo tsɔtsɔ de eme ƒe ƒuƒoƒoawo la, ahiã be nàɖo container
(si woŋlɔ ɖe ete) ƒe tiatia be nàƒo asa na nugbegblẽ le ame ŋu siwo mèdi o.
Dze dɔwɔnu ƒe aɖaŋuɖoɖoa gɔme to JavaScript dzi:
- $ ( '#kpɔɖeŋu' ). dɔwɔnu ƒe aɖaŋuɖoɖo ( tiatiawɔblɔɖe ) .
Woateŋu atsɔ tiatiawɔblɔɖewo ato nyatakaka ƒe nɔnɔmewo alo JavaScript dzi. Le nyatakaka ƒe nɔnɔmewo gome la, tsɔ tiatia ƒe ŋkɔ kpe ɖe data-
, abe alesi wòle le data-animation=""
.
Ŋkɔ | ƒomevi | gᴐmedzeƒe | nuɖᴐɖᴐ |
---|---|---|---|
nɔnɔmetata si me woɖea nɔnɔmetatawo le | boolean ƒe ƒuƒoƒo | nyateƒe | zã css fade ƒe tɔtrɔ ɖe dɔwɔnu ƒe aɖaŋuɖoɖoa dzi |
html | boolean ƒe ƒuƒoƒo | alakpa | De html dɔwɔnu ƒe aɖaŋuɖoɖoa me. Ne alakpae la, woazã jquery ƒe text mɔnu atsɔ ade emenyawo dom la me. Zã nuŋɔŋlɔ ne ètsi dzi ɖe XSS ƒe amedzidzedzewo ŋu. |
ɖoɖo ɖe teƒe aɖe | kaƒoƒo | wᴐ dᴐ | 'dzi' | alesi woaɖo dɔwɔnu ƒe aɖaŋuɖoɖoa ɖe teƒe - ta | ete | miame | nyui |
tiatiawɔla | ka | alakpa | Ne wotsɔ tiatiawɔnu aɖe na la, woatsɔ dɔwɔnu ƒe aɖaŋuɖoɖo nuawo ade asi na taɖodzinu siwo woɖo. |
tanya | kaƒoƒo | wᴐ dᴐ | '' . | tanya ƒe asixɔxɔ gbãtɔ ne `title` tag mele afima o |
daƒe | ka | 'hover focus'. | alesi woadze dɔwɔnu ƒe aɖaŋuɖoɖo gɔmee - zi | hover | susu tsɔtsɔ ɖo nu ŋu | asi nu. De dzesii be wò nya la to trigger mutliple, teƒe si woɖe ɖe vovo, trigger ƒomeviwo. |
hehe ɖe megbe | xexlẽdzesi | nu | 0. | megbedede ɖeɖefia kple eɣla dɔwɔnu ƒe aɖaŋuɖoɖo (ms) - meku ɖe asi trigger ƒomevi ŋu o Ne wotsɔ xexlẽdzesi aɖe na la, wozãa megbedede ɖe ɣla/ɖee fia siaa ŋu Nu ƒe wɔwɔme enye: |
nugoe me nugoe | kaƒoƒo | alakpa | alakpa | Tsɔ dɔwɔnu ƒe aɖaŋuɖoɖoa kpe ɖe nu aɖe koŋ ŋu |
- <a href = "#" data-toggle = "dɔwɔnu ƒe aɖaŋuɖoɖo" title = "dɔwɔnu gbãtɔ ƒe aɖaŋuɖoɖo" > tsɔ asi le dzinye </a>
Kpe dɔwɔnu ƒe aɖaŋuɖoɖo ƒe asiléƒe ɖe element ƒe nuƒoƒoƒu ŋu.
Eɖea element aɖe ƒe dɔwɔnu ƒe aɖaŋuɖoɖo fiana.
- $ ( '#nu vevi aɖe' ). dɔwɔnu ƒe aɖaŋuɖoɖo ( 'ɖee fia' ) .
Ɣla element aɖe ƒe dɔwɔnu ƒe aɖaŋuɖoɖo.
- $ ( '#nu vevi aɖe' ). dɔwɔnu ƒe aɖaŋuɖoɖo ( 'ɣla' ) .
Trɔ asi le element aɖe ƒe dɔwɔnu ƒe aɖaŋuɖoɖo ŋu.
- $ ( '#nu vevi aɖe' ). dɔwɔnu ƒe aɖaŋuɖoɖo ( 'toggle' ) .
Eɣlaa element aɖe ƒe dɔwɔnu ƒe aɖaŋuɖoɖo eye wòtsrɔ̃nɛ.
- $ ( '#nu vevi aɖe' ). dɔwɔnu ƒe aɖaŋuɖoɖo ( 'tsrɔ̃' ) .
Tsɔ nyatakaka suesuesue siwo wotsɔ ƒo xlãe, abe esiwo le iPad la dzi ene, kpe ɖe nu ɖesiaɖe ŋu hena nyatakaka evelia ƒe aƒe. Tsɔ asi ɖo abɔta la dzi be nàdze popover la gɔme. Ebia be woatsɔ Tooltip ade eme.
Tiatia ene li: etame, ɖusime, ete, kple miame.
Sed posuere consectetur ƒe ɣeyiɣi si woɖo ɖi le lobortis. Aenean ƒe eu leo quam. Atsyɔ̃ɖoɖo si le abe ƒuƒuiƒe ene la nye lacinia quam venenatis vestibulum.
Sed posuere consectetur ƒe ɣeyiɣi si woɖo ɖi le lobortis. Aenean ƒe eu leo quam. Atsyɔ̃ɖoɖo si le abe ƒuƒuiƒe ene la nye lacinia quam venenatis vestibulum.
Sed posuere consectetur ƒe ɣeyiɣi si woɖo ɖi le lobortis. Aenean ƒe eu leo quam. Atsyɔ̃ɖoɖo si le abe ƒuƒuiƒe ene la nye lacinia quam venenatis vestibulum.
Sed posuere consectetur ƒe ɣeyiɣi si woɖo ɖi le lobortis. Aenean ƒe eu leo quam. Atsyɔ̃ɖoɖo si le abe ƒuƒuiƒe ene la nye lacinia quam venenatis vestibulum.
Womewɔ dzesi aɖeke si woɖe fia abe popovers ene tso JavaScript kple emenyawo me le data
nɔnɔme aɖe me o.
Na popovers nawɔ dɔ to JavaScript dzi:
- $ ( '#kpɔɖeŋu' ). popover ( tiatia siwo woawɔ ) .
Woateŋu atsɔ tiatiawɔblɔɖewo ato nyatakaka ƒe nɔnɔmewo alo JavaScript dzi. Le nyatakaka ƒe nɔnɔmewo gome la, tsɔ tiatia ƒe ŋkɔ kpe ɖe data-
, abe alesi wòle le data-animation=""
.
Ŋkɔ | ƒomevi | gᴐmedzeƒe | nuɖᴐɖᴐ |
---|---|---|---|
nɔnɔmetata si me woɖea nɔnɔmetatawo le | boolean ƒe ƒuƒoƒo | nyateƒe | zã css fade ƒe tɔtrɔ ɖe dɔwɔnu ƒe aɖaŋuɖoɖoa dzi |
html | boolean ƒe ƒuƒoƒo | alakpa | De html popover la me. Ne alakpae la, woazã jquery ƒe text mɔnu atsɔ ade emenyawo dom la me. Zã nuŋɔŋlɔ ne ètsi dzi ɖe XSS ƒe amedzidzedzewo ŋu. |
ɖoɖo ɖe teƒe aɖe | kaƒoƒo | wᴐ dᴐ | 'nyui' | alesi woaɖo popover la ɖe ɖoɖo nu - ta | ete | miame | nyui |
tiatiawɔla | ka | alakpa | ne wotsɔ tiatiawɔnu aɖe na la, woatsɔ dɔwɔnu ƒe aɖaŋuɖoɖo nuawo ade asi na taɖodzinu siwo woɖo |
daƒe | ka | 'zi edzi'. | alesi wodzea popover gɔmee - zi | hover | susu tsɔtsɔ ɖo nu ŋu | asi nu |
tanya | kaƒoƒo | wᴐ dᴐ | '' . | default tanya ƒe asixɔxɔ ne `title` nɔnɔme mele afima o |
eme nuwo | kaƒoƒo | wᴐ dᴐ | '' . | default content value ne `data-content` nɔnɔme mele afima o |
hehe ɖe megbe | xexlẽdzesi | nu | 0. | delay ɖeɖefia kple eɣla popover (ms) - meku ɖe asi trigger ƒomevi ŋu o Ne wotsɔ xexlẽdzesi aɖe na la, wozãa megbedede ɖe ɣla/ɖee fia siaa ŋu Nu ƒe wɔwɔme enye: |
nugoe me nugoe | kaƒoƒo | alakpa | alakpa | Etsɔa popover la kpena ɖe nu aɖe koŋ ŋu |
Le dɔwɔwɔ ta la, Tooltip kple Popover data-apis nye opt in. Ne èdi be yeazã wo la, ɖeko nàgblɔ tiatiawɔblɔɖe ƒe tiatia aɖe.
Edzea popovers gɔme na element nuƒoƒoƒu.
Eɖea elements popover aɖe fiana.
- $ ( '#nu vevi aɖe' ). popover ( 'ɖee fia' ) .
Ɣla elementwo ƒe popover aɖe.
- $ ( '#nu vevi aɖe' ). popover ( 'ɣla' ) .
Trɔ asi le elements popover ŋu.
- $ ( '#nu vevi aɖe' ). popover ( 'trɔ asi le eŋu' ) .
Eɣlaa element aɖe ƒe popover eye wòtsrɔ̃nɛ.
- $ ( '#nu vevi aɖe' ). popover ( 'tsrɔ̃ nu' ) .
Tsɔ dismiss dɔwɔwɔ kpe ɖe nuxlɔ̃ame gbedasiwo katã ŋu kple plugin sia.
Trɔ esia kple ema eye nàgadze agbagba ake. Duis mollis, est non commodo luctus, nisi erat agbatsɔla ƒe lãgbalẽ, eget lacinia odio sem nec elit. Cras mattis consectetur purus nɔa anyi ɖe lãmi me.
Na nuxlɔ̃ame aɖe ɖeɖeɖa to JavaScript dzi nawɔ dɔ:
- $ ( ".nuxlɔ̃ame" ). nuxlɔ̃ame () .
Ðeko nàtsɔe akpe data-dismiss="alert"
ɖe wò nutrenu ƒe dzesi ŋu be wòana nuxlɔ̃ame ƒe nutrenu ƒe dɔwɔwɔ le eɖokui si.
- <a klass = "tu" data-dismiss = "nuxlɔ̃ame" href = "#" > &ɣeyiɣiwo; </a>
Bla nuxlɔ̃amewo katã kple dɔwɔwɔ kplikplikpli. Be wò nuxlɔ̃amewo nawɔ dɔ ne wotu la, kpɔ egbɔ be wowɔ .fade
kple .in
klass la le wo ŋu xoxo.
Etua nuxlɔ̃ame aɖe.
- $ ( ".nuxlɔ̃ame" ). alert ( 'tu ɖe eŋu' ) .
Bootstrap ƒe nuxlɔ̃ame ƒe hatsotso la ɖea nudzɔdzɔ ʋee aɖewo ɖe go hena hooking ɖe nuxlɔ̃ame ƒe dɔwɔwɔ me.
Nudzᴐdzᴐ | Nuɖᴐɖᴐ |
---|---|
tu | Nudzɔdzɔ sia doa dzo enumake ne woyɔ close kpɔɖeŋu mɔnu la. |
wotu nu ɖo | Woɖea nudzɔdzɔ sia ne wotu nuxlɔ̃amea (alala be css ƒe tɔtrɔwo nawu enu). |
- $ ( '#nye-nuxlɔ̃ame' ). bind ( 'tu' , dɔwɔwɔ () { .
- // wɔ nane...
- }) ƒe .
Na gɔmeɖoanyi ƒe atsyãwo kple kpekpeɖeŋu si te ŋu trɔna ɖe nɔnɔmewo ŋu na akpa siwo woate ŋu agbã abe accordions kple mɔfiame ene.
* Ebia be woatsɔ Transitions ƒe kpeɖeŋutɔa ade eme.
Míezã collapse plugin la, míewɔ accordion ƒe atsyã ƒe widget bɔbɔe aɖe:
- <div klass = "akɔdion" id = "akɔdin2" >
- <div klass = "accordion-ƒuƒoƒo" >
- <div klass = "accordion-tanya" >
- <a klass = "accordion-toggle" data-toggle = "akɔ" nyatakaka-dzila = "#akɔdin2" href = "#akɔ ɖeka" >
- Ƒuƒoƒo ƒe Nu #1 si Woate Ŋu Agbã
- </a>
- </div> ƒe nyawo
- <div id = "collapseOne" class = "accordion-ŋutilã ƒe gbagbã le" >
- <div klass = "accordion-ememetɔ" >
- Anim pariatur ƒe nyagbɔgblɔ...
- </div> ƒe nyawo
- </div> ƒe nyawo
- </div> ƒe nyawo
- <div klass = "accordion-ƒuƒoƒo" >
- <div klass = "accordion-tanya" >
- <a class = "accordion-toggle" data-toggle = "akɔ" nyatakaka-dzila = "#akɔdin2" href = "#akɔ Eve" >
- Ƒuƒoƒo ƒe Nu #2 si Woate Ŋu Agbã
- </a>
- </div> ƒe nyawo
- <div id = "collapseTwo" klass = "akɔrdion-ŋutilã ƒe gbagbã" >
- <div klass = "accordion-ememetɔ" >
- Anim pariatur ƒe nyagbɔgblɔ...
- </div> ƒe nyawo
- </div> ƒe nyawo
- </div> ƒe nyawo
- </div> ƒe nyawo
- ...
Àte ŋu azã plugin la hã accordion ƒe dzesi manɔmee. Na abɔta aɖe natrɔ nu bubu ƒe kekeɖenu kple eƒe gbagbã.
- <bɔt ƒomevi = "bɔt" klass = "btn btn-afɔku" nyatakaka-trɔtrɔ = "mumu" nyatakaka-taɖodzinu = "#demo" >
- bɔbɔe si woate ŋu agbã
- </button> ƒe dzesi
- <div id = "demo" klass = "gbã le" > ... </div>
Ðeko nàtsɔe akpe ɖe eŋu data-toggle="collapse"
kple a data-target
to element be wòade dɔ asi na element si woate ŋu agbã la dzi kpɔkpɔ le eɖokui si. Nɔnɔmea data-target
xɔa css tiatia aɖe be woatsɔ awɔ collapse la ŋudɔ ɖe. Kpɔ egbɔ be yetsɔ klass la kpe collapse
ɖe nusi woate ŋu agbã ŋu. Ne èdi be wòaʋu le gɔmedzedzea me la, tsɔ klass bubu kpee in
.
Be nàtsɔ ƒuƒoƒodzikpɔkpɔ si le abe accordion ene akpe ɖe dziɖuɖu si woate ŋu agbã ŋu la, tsɔ nyatakaka ƒe nɔnɔme kpe ɖe eŋu data-parent="#selector"
. Kpɔ demo la be nàkpɔ esia le dɔwɔwɔ me.
Na wòawɔ dɔ kple asi kple:
- $ ( ".klɔƒe" ). dze anyi () .
Woateŋu atsɔ tiatiawɔblɔɖewo ato nyatakaka ƒe nɔnɔmewo alo JavaScript dzi. Le nyatakaka ƒe nɔnɔmewo gome la, tsɔ tiatia ƒe ŋkɔ kpe ɖe data-
, abe alesi wòle le data-parent=""
.
Ŋkɔ | ƒomevi | gᴐmedzeƒe | nuɖᴐɖᴐ |
---|---|---|---|
dzila | tiatiawɔla | alakpa | Ne selector la ekema woatu nusiwo katã woateŋu agbã le dzila si woɖo la te ne woɖe nu sia si woateŋu agbã la fia. (si sɔ kple accordion ƒe nuwɔna si wozãna tsã) |
trɔ asi le eŋu | boolean ƒe ƒuƒoƒo | nyateƒe | Trɔa nusi woate ŋu agbã la le yɔyɔ dzi |
Ewɔa wò nyatakakawo ŋudɔ abe nusi woate ŋu agbã ene. Lɔ̃ ɖe tiatia siwo woate ŋu awɔ le wo ɖokui si dzi object
.
- $ ( '#nye si woate ŋu aƒo ƒu' ). ƒuƒuiƒe ({
- toggle : alakpa
- }) ƒe .
Trɔa nusi woate ŋu agbã la ɖe nusi woɖe fia alo woɣla me.
Fia nusi woate ŋu agbã.
Eɣlaa nusi woate ŋu agbã.
Bootstrap ƒe collapse klass ɖea nudzɔdzɔ ʋee aɖewo ɖe go na hooking ɖe collapse dɔwɔwɔ me.
Nudzᴐdzᴐ | Nuɖᴐɖᴐ |
---|---|
ɖe fia | Nudzɔdzɔ sia doa dzo enumake ne woyɔ show kpɔɖeŋu mɔnu la. |
woɖee fia | Woɖea nudzɔdzɔ sia ne wowɔ collapse element aɖe be wòadze na zãla (alala be css ƒe tɔtrɔwo nawu enu). |
be | Wodaa tu nudzɔdzɔ sia enumake ne woyɔ hide mɔnua vɔ. |
si le ɣaɣlame | Woɖea nudzɔdzɔ sia ne woɣla collapse element aɖe ɖe zãla la (alala be css ƒe tɔtrɔwo nawu enu). |
- $ ( '#nye si woate ŋu aƒo ƒu' ). on ( 'ɣla' , dɔwɔwɔ () { .
- // wɔ nane...
- }) ƒe .
Slideshow si le ete la fia generic plugin kple component na kekeli to elementwo abe carousel ene me.
- <div id = "nyeCarousel" klass = "carousel ƒe ʋuʋudedi" >
- <ol klass = "carousel-fianuwo" >
- <li nyatakaka-taɖodzinu = "#myCarousel" nyatakaka-slide-to = "0" klass = "dɔwɔwɔ" ></li>
- <li nyatakaka-taɖodzinu = "#myCarousel" nyatakaka-slide-yi = "1" ></li>
- <li nyatakaka-taɖodzinu = "#myCarousel" nyatakaka-slide-yi = "2" ></li>
- </ol>
- <!-- Carousel nuawo -->
- <div klass = "carousel-ememetɔ" >
- <div klass = "nu si le dɔ wɔm" > ... </div>
- <div klass = "nu" > ... </div>
- <div klass = "nu" > ... </div>
- </div> ƒe nyawo
- <!-- Ʋuʋudedi nav -->
- <a klass = "carousel-dziɖuɖu miame" href = "#nyeCarousel" data-slide = "do ŋgɔ" > ‹ </a>
- <a klass = "carousel-dziɖuɖu ƒe gomenɔamesi" href = "#nyeCarousel" data-slide = "si kplɔe ɖo" > › </a>
- </div> ƒe nyawo
Zã data attributes nàtsɔ akpɔ carousel la ƒe nɔƒe dzi bɔbɔe. data-slide
xɔa nya veviawo prev
alo next
, si trɔa slide ƒe nɔƒe ne wotsɔe sɔ kple eƒe nɔƒe fifia. Alo, zãe data-slide-to
tsɔ to slide index ƒuƒlu aɖe yi carousel data-slide-to="2"
la gbɔ , si ti kpo nye slide ƒe nɔƒe yi index aɖe koŋ si dze egɔme kple 0
.
Yɔ carousel kple asi kple:
- $ ( '.ʋuʋudedi' ). carousel ƒe ʋuƒo () .
Woateŋu atsɔ tiatiawɔblɔɖewo ato nyatakaka ƒe nɔnɔmewo alo JavaScriptz dzi. Le nyatakaka ƒe nɔnɔmewo gome la, tsɔ tiatia ƒe ŋkɔ kpe ɖe data-
, abe alesi wòle le data-interval=""
.
Ŋkɔ | ƒomevi | gᴐmedzeƒe | nuɖᴐɖᴐ |
---|---|---|---|
dometsotso | xexlẽdzesi | 5000 ƒe xexlẽme | Ɣeyiɣi agbɔsɔsɔme si woatsɔ ahe ɖe megbe le nu aɖe ƒe gasɔdodo le eɖokui si dome. Ne alakpae la, carousel mazɔ le eɖokui si o. |
tɔ vie | ka | "hover" . | Etɔ te kekeli si le carousel la me le mouseenter dzi eye wògadze kekeli si le carousel la dzi la gɔme le mouseleave dzi. |
Edzea carousel la gɔme kple tiatia siwo woate ŋu atia object
eye wòdzea gasɔdodo gɔme to nuawo me.
- $ ( '.ʋuʋudedi' ). carousel ƒe ʋuƒo ({ .
- dometsotso : 2000
- }) ƒe .
Tsitsatsa to carousel-nuawo me tso miame yi ɖusime.
Exea mɔ na carousel la be wòagazɔ to nuwo me o.
Trɔ carousel la ɖe frame aɖe koŋ dzi (0 si wotu ɖe edzi, si sɔ kple array).
Tsitre ɖe nusi do ŋgɔ ŋu.
Tsitre ɖe nu si kplɔe ɖo ŋu.
Bootstrap ƒe carousel klass ɖea nudzɔdzɔ eve ɖe go na hooking ɖe carousel dɔwɔwɔ me.
Nudzᴐdzᴐ | Nuɖᴐɖᴐ |
---|---|
ɖiɖi | Nudzɔdzɔ sia dzona enumake ne woyɔ slide kpɔɖeŋu mɔnu la. |
ƒuƒlu | Wodaa tu nudzɔdzɔ sia ne carousel la wu eƒe slide ƒe tɔtrɔ nu. |
Gɔmeɖoanyi, si keke ɖe enu bɔbɔe plugin na kabakaba wɔwɔ kabakaba typeaheads dzeaniwo kple nɔnɔme nuŋɔŋlɔ ɖesiaɖe.
- <input type = "nuŋɔŋlɔ" data-na = "typeahead" >
Àdi be yeaɖoe autocomplete="off"
be yeaxe mɔ na web-browser ƒe nuɖuɖu siwo woɖo ɖi la be woagadze le Bootstrap typeahead ƒe fli dzi o.
Tsɔ nyatakaka ƒe nɔnɔmewo kpee be nàŋlɔ element aɖe si me typeahead ƒe dɔwɔwɔ le abe alesi woɖee fia le kpɔɖeŋu si le etame me ene.
Yɔ typeahead la kple asi kple:
- $ ( '.ŋlɔ ŋgɔgbe' ). ŋlɔ nu ɖe ŋgɔ () .
Woateŋu atsɔ tiatiawɔblɔɖewo ato nyatakaka ƒe nɔnɔmewo alo JavaScript dzi. Le nyatakaka ƒe nɔnɔmewo gome la, tsɔ tiatia ƒe ŋkɔ kpe ɖe data-
, abe alesi wòle le data-source=""
.
Ŋkɔ | ƒomevi | gᴐmedzeƒe | nuɖᴐɖᴐ |
---|---|---|---|
dzᴐtsoƒe | array, dɔwɔwɔ | [ ] . | Nyatakakatsoƒe si ŋu woabia nya tsoe. Ate ŋu anye kawo ƒe ƒuƒoƒo alo dɔwɔwɔ aɖe. Wotsɔa nyaʋiʋli eve toa dɔwɔwɔa me, query asixɔxɔ si le nyawo tsɔtsɔ de eme ƒe akpaa dzi kple process yɔyɔ si wogbugbɔ gblɔna. Woateŋu azã dɔwɔwɔa le ɣeyiɣi ɖeka me to nyatakakatsoƒea gbugbɔgaɖo tẽ alo le ɣeyiɣi ɖeka me to process yɔyɔa ƒe nyaʋiʋli ɖeka dzi. |
nuwo | xexlẽdzesi | 8 | Nusiwo woaɖe afia le xexlẽdzesi si le fli me la ƒe xexlẽme si sɔ gbɔ wu. |
minDidime ƒe didime | xexlẽdzesi | 1. 1. | Ŋɔŋlɔdzesiwo ƒe didime suetɔ kekeake si hiã hafi nàdze aɖaŋuɖoɖo siwo woatsɔ akpe ɖe wo ɖokui ŋu gɔme |
matcher | wᴐ dᴐ | nu suesuesuewo ƒe seselelãme manɔmee | Mɔnu si wozãna tsɔ nyaa nenye be nyabiase aɖe sɔ kple nu aɖe. Lɔ̃ ɖe nyaʋiʋli ɖeka dzi, item si ŋu woado nyabiasea kpɔ le. Kpɔ nyabiase si li fifia kple this.query . Trɔ boolean true ne biabia nye ɖeka. |
nuƒoƒoƒula | wᴐ dᴐ | exact match, ŋɔŋlɔdzesi gãwo ƒe dzesiwo, ŋɔŋlɔdzesi gãwo ƒe vovototodedeameme |
Mɔnu si wozãna tsɔ ɖoa autocomplete ƒe emetsonuwo ɖe ɖoɖo nu. Lɔ̃ ɖe nyaʋiʋli ɖeka dzi items eye typeahead ƒe kpɔɖeŋu ƒe kekeme le esi. Tsɔ nyabiase si nèbia fifia la ɖo this.query . |
updater | wᴐ dᴐ | trɔa nusi nètia la vɛ | Mɔnu si wozãna tsɔ trɔa nu si nètia la vɛ. Lɔ̃ ɖe nyaʋiʋli ɖeka dzi, item eye kple typeahead ƒe kpɔɖeŋu ƒe kekeme le esi. |
nusi te gbe ɖe edzi | wᴐ dᴐ | te gbe ɖe nusiwo katã sɔ kple wo nɔewo siwo woɖo ɖi la dzi | Mɔnu si wozã tsɔ te gbe ɖe autocomplete ƒe emetsonuwo dzi. Lɔ̃ ɖe nyaʋiʋli ɖeka dzi item eye typeahead ƒe kpɔɖeŋu ƒe kekeme le esi. Ele be wòatrɔ html. |
Edzea nyawo tsɔtsɔ de eme gɔme kple typeahead.
Subnavigation si le miame la nye affix plugin la ƒe live demo.
Be nàtsɔ affix behavior akpe ɖe element ɖesiaɖe ŋu bɔbɔe la, ɖeko nàtsɔe akpe data-spy="affix"
ɖe element si nèdi be yeatsa ŋku ŋu. Emegbe zã offsets nàtsɔ aɖe ɣeyiɣi si nàtrɔ asi le element aɖe ƒe pinning ŋu kple esi nàtsi la gɔme.
- <div nyatakaka-ŋkutsala = "affix" nyatakaka-offset-ta = "200" > ... </div>
affix
,
affix-top
kple
affix-bottom
. Ðo ŋku edzi nàlé ŋku ɖe dzila aɖe si ate ŋu adze anyi ŋu ne affix la dze egɔme elabena ele nyatakakawo ɖem ɖa le axaa ƒe sisi si sɔ me.
Yɔ affix plugin la to JavaScript dzi:
- $ ( '#navbar' ). affix () ƒe akpa aɖe.
Woateŋu atsɔ tiatiawɔblɔɖewo ato nyatakaka ƒe nɔnɔmewo alo JavaScript dzi. Le nyatakaka ƒe nɔnɔmewo gome la, tsɔ tiatia ƒe ŋkɔ kpe ɖe data-
, abe alesi wòle le data-offset-top="200"
.
Ŋkɔ | ƒomevi | gᴐmedzeƒe | nuɖᴐɖᴐ |
---|---|---|---|
offset ƒe ƒuƒoƒo | xexlẽdzesi | dɔwɔwɔ | nu | 10 | Pixels siwo woaɖe tso screen dzi ne wole akɔnta bum afisi agbalẽxatsaxatsa le. Ne wotsɔ xexlẽdzesi ɖeka na la, woawɔ offset la ŋudɔ le etame kple miame siaa. Be nàse mɔfiame ɖeka, alo vovototo tɔxɛ geɖe la, ɖeko nàna nu aɖe offset: { x: 10 } . Zã dɔwɔwɔ ne ehiã be nàna offset le mɔ si trɔna nu (eɖea vi na aɖaŋu aɖewo siwo ɖoa nya ŋu). |