Bootstrap ka yɔrɔw lase ɲɛnamaya ma—sisan ni jQuery ka fɛn 13 ye minnu bɛ kɛ ka kɛɲɛ ni mɔgɔw sago ye.
Pluginw bɛ Se ka Dòn u kelen-kelen na (hali n’a y’a Sɔrɔ dɔw ye dependencies (daɲɛw) wajibiya), walima u bɛɛ bɛ Se ka Dòn a la siɲɛ kelen. Bootstrap.js ni bootstrap.min.js fila bɛɛ bɛ 'plugin (dakun) bɛɛ Sɔrɔ filen kelen kɔnɔ.
I bɛ se ka baara kɛ ni Bootstrap plugins bɛɛ ye dɔrɔn markup API fɛ k’a sɔrɔ i ma JavaScript sɛrɛ kelen sɛbɛn. Nin ye Bootstrap ka API fɔlɔ ye wa a ka kan ka kɛ i ka jateminɛ fɔlɔ ye ni i bɛ baara kɛ ni plugin ye.
O fɔlen, ko dɔw la, a bɛ se ka kɛ ko a ka ɲi ka nin baarakɛcogo in faga. O la, an bɛ se fana Di ka data attribut API bali ni ko kɛlenw bɛɛ sirili ye farikolo tɔgɔdagalen kan ni `'data-api'` ye. Nin bɛ i n’a fɔ nin cogo in na:
- $ ( 'farikolo' ). off ( '.data-api' ) .
O cogo kelen na, walasa ka fɛn kɛrɛnkɛrɛnnen dɔ Laɲini, i bɛ fɛn in tɔgɔ Dòn dɔrɔn i n’a fɔ tɔgɔda-yɔrɔ ka Fàra data-api tɔgɔda-yɔrɔ kan i n’a fɔ nin:
- $ ( 'farikolo' ). off ( '.kɔlɔsili.data-api' ) .
An dalen b’a la fana ko i ka kan ka se ka baara kɛ ni Bootstrap plugins bɛɛ ye JavaScript API dɔrɔn fɛ. Foroba APIw bɛɛ ye fɛɛrɛ kelenw ye, minnu bɛ se ka siri ni cakɛda ye, ani ka segin dalajɛlen kan min waleyara.
- $ ( ".btn.farati" ). butɔni ( "toggle" ). addClass ( "fasa" ) .
Fɛɛrɛ bɛɛ ka kan ka sɔn sugandili fɛn dɔ ma, sɛrɛ min bɛ fɛɛrɛ kɛrɛnkɛrɛnnen dɔ laɲini, walima foyi tɛ (min bɛ fɛn dɔ daminɛ ni kɛcogo kɔrɔ ye):
- $ ( "#n ka Modal" ). modal () // daminɛ ni defaults ye
- $ ( "#n ka Modal" ). modal ({ klaviyeti : nkalon }) // daminɛna ni klaviyeti tɛ
- $ ( "#n ka Modal" ). modal ( 'show' ) // bɛ jirali daminɛ ani k'a wele o yɔrɔnin bɛɛ
Plugin kelen-kelen bɛɛ fana b’a ka raw constructor jira `Constructor` property kan: $.fn.popover.Constructor
. N’i b’a fɛ ka plugin instance kɛrɛnkɛrɛnnen dɔ sɔrɔ, i k’a sɔrɔ k’a ɲɛsin element dɔ ma: $('[rel=popover]').data('popover')
.
Tuma dɔw la a ka kan ka baara kɛ ni Bootstrap plugins ye ni UI framework wɛrɛw ye. O cogoyaw la, tɔgɔda-yɔrɔ-ko bɛ Se ka Kɛ tuma dɔw la. N'o Kɛra, i bɛ Se ka weleli .noConflict
Kɛ i b'a fɛ ka min nafa Lasegin.
- var bootstrapButɔni = $ . fn ye . butɔni . noConflict () // segin $.fn.button ka nafa min dira ka kɔrɔ
- $ ye . fn ye . bootstrapBtn = bootstrapButton // ka $().bootstrapBtn di bootstrap baarakɛcogo ma
Bootstrap bɛ ko kɛlenw di minnu bɛ kɛ ka kɛɲɛ ni mɔgɔw sago ye, ka ɲɛsin plugin ka wale kɛrɛnkɛrɛnnenw fanba ma. A ka c’a la, ninnu bɛ Nà daɲɛ-dafalen ni daɲɛ tɛmɛnen cogo la - daɲɛ-dafalen (ex. show
) bɛ Daminɛ yɔrɔ min na ko dɔ daminɛ na, wa a daɲɛ tɛmɛnen cogoya (ex. shown
) bɛ Daminɛ wale dɔ dafalen na.
Infinitif events bɛɛ bɛ preventDefault baarakɛcogo di. O bɛ se di ka wale dɔ waleyali jɔ sani a ka daminɛ.
- $ ( '#n ka Modal' ). kan ( 'jira' , baara ( e ) { .
- ni (! data ) segin e . preventDefault () // bɛ modal jirali dabila
- })
Walasa ka tɛmɛsira nɔgɔmanw sɔrɔ, aw bɛ bootstrap-transition.js don siɲɛ kelen JS filen tɔw kɛrɛfɛ. N’i bɛ baara Kɛ ni bootstrap.js dalajɛlen (walima min Bɔlen dòn) ye, kun t’a la k’o Dòn a la—a bɛ yen kaban.
Misali damadɔ bɛ sɔrɔ 'tɛmɛsira 'kɔnɔ:
Modalw bɛ nɔgɔya, nka u bɛ se ka wuli ka bɔ u nɔ na, kumaɲɔgɔnya ɲininkaliw ni baarakɛcogo fitinin wajibiyalenw ani defaults hakilitigiw.
Modal rendered min bɛ ni kuncɛ, farikolo ani walew kulu ye jukɔrɔla la.
Farikolo ɲuman kelen...
- <div class = "modal dogolen fade" >
- <div kalasi = "modal-kunnafoni" >
- <butɔni suguya = "butɔni" kalasi = "dadon" data-dismiss = "modal" aria-hidden = "tiɲɛ" > × </button> ye
- <h3> modɛli kuncɛ </h3>
- </div> ye
- <div kalasi = "modal-farikolo" >
- <p> farikolo ɲuman kelen... </p>
- </div> ye
- <div kalasi = "modali-sen" >
- <a href = "#" kalasi = "btn" > Dadon </a>
- <a href = "#" kalasi = "btn btn-primary" > Yɛlɛmaw mara </a>
- </div> ye
- </div> ye
Modal dɔ wuli ka bɔ JavaScript fɛ ni i ye butɔni digi min bɛ duguma. A bɛna sɛgɛn ka jigin ka tunun ka bɔ ɲɛ sanfɛ.
- <!-- Butɔn ka modal --> daminɛ
- <a href = "#myModal" jɔyɔrɔ = "button" kalasi = "btn" data-toggle = "modal" > Demo modali daminɛ </a>
- <!-- Modal -->
- <div id = "myModal" kalasi = "modal dogo fade" tabindex = "-1" jɔyɔrɔ = "dialog" aria-labelledby = "myModalLabel" aria-dogolen = "tiɲɛ" >
- <div kalasi = "modal-kunnafoni" >
- <butɔni suguya = "butɔni" kalasi = "dadon" data-dismiss = "modal" aria-hidden = "tiɲɛ" > × </button>
- <h3 id = "myModalLabel" > Modali kuncɛ </h3>
- </div> ye
- <div kalasi = "modal-farikolo" >
- <p> farikolo ɲuman kelen... </p>
- </div> ye
- <div kalasi = "modali-sen" >
- <button class = "btn" data- dismiss = "modal" aria-hidden = "tiɲɛ" > Dadon </button>
- <button class = "btn btn-primary" > Yɛlɛmaw mara </button>
- </div> ye
- </div> ye
Modal dɔ baara k’a sɔrɔ i ma JavaScript sɛbɛn. Set data-toggle="modal"
on controleur element, i n’a fɔ butɔni, ka fara a kan data-target="#foo"
walima href="#foo"
ka target modal kɛrɛnkɛrɛnnen dɔ toggle.
- <button type = "button" data-toggle = "modal" data-target = "#myModal" > Modal daminɛ </button>
Modal dɔ wele ni id myModal
ye ni JavaScript sɛrɛ kelen ye:
- $ ( '#n ka Modal' ). modal ( sugandiliw ) .
Sugandili bɛ se ka tɛmɛ data attributes walima JavaScript fɛ. Donanw cogoyaw kama, aw bɛ sugandi tɔgɔ fara data-
, i n’a fɔ a bɛ cogo min na data-backdrop=""
.
Tɔ̀gɔ | ka sɛbɛen masin na | fɔlɔ | cogojirali |
---|---|---|---|
kɔkannakow | boolean ye | sɛbɛ | Modal-backdrop element dɔ bɛ a kɔnɔ. O cogo kelen na, a jira static ka ɲɛsin kɔkannafɛn dɔ ma min tɛ modal da tugu click kan. |
klaviyeti ye | boolean ye | sɛbɛ | A bɛ modal da tugu ni escape key digilen don |
k'a jira | boolean ye | sɛbɛ | A bɛ modɛli jira ni a daminɛna. |
samanen | sira | nkalon | Ni yɔrɔjan url dɔ dira, kɔnɔkow bɛna doni jQuery ka
|
A bɛ i ka kɔnɔkow baara i n’a fɔ modal. A bɛ sɔn sugandiliw ma minnu bɛ se ka kɛ object
.
- $ ( '#n ka Modal' ). modɛli ({
- klaviyeti : nkalon
- })
A bɛ modal dɔ wuli ni bolo ye.
- $ ( '#n ka Modal' ). modali ( 'toggle' ) .
A bɛ modal dɔ da wuli ni bolo ye.
- $ ( '#n ka Modal' ). modal ( 'jira' ) .
A bɛ modal dɔ dogo ni bolo ye.
- $ ( '#n ka Modal' ). modal ( 'dogo' ) .
Bootstrap ka modal class bɛ ko damadɔw jira kɛnɛ kan walasa ka hooking kɛ modal baarakɛcogo la.
Lajɛrɛ | Cogojirali |
---|---|
k'a jira | O ko in bɛ tasuma Bɔ o yɔrɔnin bɛɛ ni show misali fɛɛrɛ Weelela. |
jiralen don | O ko in bɛ Fɔ ni modal Kɛra ka Ye baarakɛla fɛ (a bɛna css 'tɛmɛsiraw makɔnɔ ka Dafa). |
ka dogo | O ko in bɛ Fɔ o yɔrɔnin bɛɛ ni hide misali fɛɛrɛ Weelera. |
dogolen | O ko in bɛ Fɔ ni modal ye dogolen Ban baarakɛla la (a bɛna css transitions makɔnɔ ka ban). |
- $ ( '#n ka Modal' ). kan ( 'dogolen' , baara () { .
- // ka fɛn dɔ kɛ...
- })
Aw bɛ fɛnw fara fɛn o fɛn kan ni nin fɛn nɔgɔman in ye, i n’a fɔ navbar, tabs ani furakisɛw.
A fara a kan data-toggle="dropdown"
ka kɛ lien walima butɔni dɔ ye walasa ka fɛn dɔ wuli ka bɔ a nɔ na.
- <div kalasi = "dɔnkilida" >
- <a class = "jigin-ka-bɔ" data-toggle = "jigin-ka-bɔ" href = "#" > Jigin-ka-bɔ-minɛn </a>
- <ul kalasi = "dugukolo-yɔrɔ" jɔyɔrɔ = "menu" aria-labelledby = "dLabel" >
- ...
- </ul>
- </div> ye
Walasa ka URLw to u cogo la, baara kɛ ni o data-target
fɛnsɛbɛn ye href="#"
.
- <div kalasi = "dɔnkilida" >
- <a kalasi = "jigin-ka-bɔ" id = "dLabel" jɔyɔrɔ = "button" kunnafoni-falen = "jigin" kunnafoni-laɲini = "#" href = "/page.html" >
- Dropdown (Donkilidala).
- <b kalasi = "karɛti" </b>
- </a>
- <ul kalasi = "dugukolo-yɔrɔ" jɔyɔrɔ = "menu" aria-labelledby = "dLabel" >
- ...
- </ul>
- </div> ye
Aw bɛ fɛnw wele JavaScript fɛ:
- $ ( '.dɔgɔtɔrɔso-toggle' ). jiginɛ () .
Foɲisi
Porogaramu api min bɛ kɛ ka menuw wuli ka taa navbar walima tabbed navigation dilen dɔ la.
ScrollSpy plugin ye nav laɲiniw ladamuni ye a yɛrɛma ka da scroll jɔyɔrɔ kan. I ka yɔrɔ lajɛ min bɛ navbar jukɔrɔ ani ka kalansen min bɛ baara kɛ, o fɛn caman Changement lajɛ. Fɛn fitinin minnu bɛ jigin, olu fana bɛna jira.
Annonce leggings keytar, brunch id art fête dolor labore. Bamako, Mali. Pitchfork yr enim lo-fi sani u ka qui. Tumblr foro-ka-tabali bisikili josariyaw fɛn o fɛn. Anim keffiyeh carles ka karti. Velit seitan mcsweeney ka fototalan 3 waraba kalo irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui n'a sɔrɔ i ma u mɛn et cardigan fond de confiance culpa biodiesel wes anderson esthétique. Nihil tatouage accusamus, cred ironie biodiesel keffiyeh artisan ullamco consequat.
Veniam marfa moustache skateboard, adipisicing fugiat velit fourchette barbe. Freegan kunsigi aliqua cupidatat mcsweeney ka vero. Cupidatat naani loko nisi, ea helvetica nulla carles. Tatouage cosby sweater dumuni camion, mcsweeney ka quis non freegan vinyl. Lo-fi wes anderson +1 ye fɛn ye min bɛ se ka kɛ. Carles non esthétique exercice quis gentrify. Bamako, Mali. Brooklyn adipisicing bololabaarakɛlaw ka biyɛri vice keytar deserunt.
Occaecat komodo min bɛ wele ko aliqua delectus. Fap artisanat bière deserunt skateboard ea. Lomo bisikili josariyaw adipisicing banh mi, velit ea sunt nivo nata locavore kafe kelen-kelen na magna veniam. Vinyle id de haute vie, écho parc consequat quis aliquip banh mi fourchette. Vero VHS ye farikolojɔli dumuniw ye. Consectetur nisi DIY mini cidenw ka sakɔsi. Cred ex in, delectus consectetur fanny pack iphone ka baara sabatili ye.
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 ciden sakɔsi marfa fɛn o fɛn delectus dumuni kamiyɔn. Sapiente sinteti id assumenda. Locavore sed helvetica cliche irony, sanpɛrɛnw i bɛ se ka u ma mɛn u la consequat hoodie gluten-free lo-fi fap aliquip. Laboure elit placeat sanni u ka feere ka ban, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan artisanat bière seitan labɛnnen velit. VHS chambray laboris ye muso ye min bɛ wele ko veniam tempor. Anim mollit minim commodo ullamco sanpɛrɛnw.
Walasa ka scrollspy kɛcogo Fàra nɔgɔya la i ka topbar navigation kan, data-spy="scroll"
i b’a fɛ ka spy min Kɛ, i bɛ Fàra o kan dɔrɔn (a ka c’a la nin bɛ Kɛ farikolo ye) ani data-target=".navbar"
ka nav min sugandi i bɛ baara Kɛ ni min ye. I b’a fɛ ka baara kɛ ni scrollspy ye ni .nav
component dɔ ye.
- <farikolo data-spy = "scroll" data-laɲini = ".navbar" > ... </body>
Aw bɛ scrollspy wele JavaScript fɛ:
- $ ( '#navbar' ye ) ye. sɛbɛnfura () .
<a href="#home">home</a>
ka kan ka bɛn fɛn dɔ ma dom kɔnɔ i n’a fɔ
<div id="home"></div>
.
Ni aw bɛ baara kɛ ni scrollspy ye ka fara fɛnw farali walima u bɔli kan DOM kɔnɔ, aw bɛna a ɲini ka refresh fɛɛrɛ wele i n’a fɔ:
- $ ( '[data-spy="sɛbɛnni"]' ). kelen-kelen bɛɛ ( baara () { .
- var $spy = $ ( nin ). scrollspy ( ‘lafiɲɛbɔ’ ) .
- });
Sugandili bɛ se ka tɛmɛ data attributes walima JavaScript fɛ. Donanw cogoyaw kama, aw bɛ sugandi tɔgɔ fara data-
, i n’a fɔ a bɛ cogo min na data-offset=""
.
Tɔ̀gɔ | ka sɛbɛen masin na | fɔlɔ | cogojirali |
---|---|---|---|
offset (fɔcogo ɲuman). | nimɔrɔ | 10 ye | Pixels ka offset ka bɔ sanfɛ ni jatebɔ jɔyɔrɔ scroll. |
Lajɛrɛ | Cogojirali |
---|---|
ka baara kɛ | O ko in bɛ tasuma Bɔ tuma o tuma ni fɛn kura dɔ Kɛra baara la scrollspy fɛ. |
Tab baarakɛcogo teliyalen, fangama dɔ fara a kan walasa ka tɛmɛ ni sigida kɔnɔkow pannew ye, hali ni fɛnw ye minnu bɛ jigin.
Raw denim i bɛ se ka u ma mɛn u jean shorts Austin. Nesciunt tofu stumptown aliqua, retro sinteti master saniya. Moustache cliche tempor, williamsburg carles ka helvetica sogo-minɛ. Reprehenderit butcher retro keffiyeh sugo minɛbaga synth. Cosby sweater eu banh mi, qui irure terry richardson ex calmar. Bamako, Mali. Aliquip placeat ka baara kɛ ni iphone ye. Seitan aliquip quis cardigan ameriki fini, sogo feerela 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 sanni u ka feere ka ban master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art fête locavore loup cliche haute vie écho parc Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi sanni u ka foro-ka-tabali VHS viral locavore cosby sweater feere ka ban. Lomo waraba viral, moustache labɛn sanpɛrɛn keffiyeh artisanat bière marfa éthique. Wolo salvia freegan, sartorial keffiyeh echo parc vegan. Bamako, Mali.
Tabable tabs daminɛ JavaScript fɛ (tab kelen-kelen bɛɛ ka kan ka baara kɛ kelen-kelen):
- $ ( '#n ka Tab a' ). digi ( baarakɛcogo ( e ) { .
- e . baliDefault ();
- $ ( nin ). tab ( 'jira' );
- })
Aw bɛ se ka tablo kelen-kelen bɛɛ baara cogo caman na:
- $ ( '#ne ka Tab a[href="#profile"]' ). tab ( 'jira' ); // Tab sugandi tɔgɔ fɛ
- $ ( '#n ka Tab a:fɔlɔ' ). tab ( 'jira' ); // Tab fɔlɔ sugandi
- $ ( '#n ka Tab a: laban' ). tab ( 'jira' ); // Tab laban sugandi
- $ ( '#n ka Tab li:eq(2) a' ). tab ( 'jira' ); // Tab sabanan sugandi (0-indexed) .
I bɛ se ka tab walima pill navigation dɔ baara k’a sɔrɔ i ma JavaScript si sɛbɛn ni i ye element dɔ jira dɔrɔn data-toggle="tab"
walima a kan. data-toggle="pill"
Ni i ye nav
and nav-tabs
classes fara tab kan ul
, o bɛna Bootstrap tab styling waleya.
- <ul kalasi = "nav nav-tabs" >
- <li><a href = "#so" data-toggle = "tab" > So </a></li>
- <li><a href = "#profile" data-toggle = "tab" > Ɲɛjirali </a></li>
- <li><a href = "#cikanw" data-toggle = "tab" > Cikanw </a></li>
- <li><a href = "#settings" data-toggle = "tab" > Labɛnw </a></li>
- </ul>
A bɛ tab element ni kɔnɔkow minɛn dɔ baara. Tab ka kan ka kɛ ni a ye data-target
walima ni href
targeting a container node ye DOM kɔnɔ.
- <ul kalasi = "nav nav-tabs" id = "ne ka Tab" >
- <li kalasi = "baarakɛ" ><a href = "#so" > So </a></li>
- <li><a href = "#profile" > Ɲɛjirali </a></li>
- <li><a href = "#cikanw" > Cikanw </a></li>
- <li><a href = "#settings" > Labɛnw </a></li>
- </ul>
- <div kalasi = "tablo-kɔnɔkow" >
- <div kalasi = "tablo-pane active" id = "so" > ... </div>
- <div kalasi = "tab-pane" id = "profil" > ... </div>
- <div kalasi = "tab-pane" id = "cikanw" > ... </div>
- <div kalasi = "tab-pane" id = "labɛnw" > ... </div>
- </div> ye
- <sɛbɛnni>
- $ ( baara () { .
- $ ( '#n ka Tab a: laban' ). tab ( 'jira' );
- })
- </script> ye
Lajɛrɛ | Cogojirali |
---|---|
k'a jira | Nin ko in bɛ tasuma don tab jirali la, nka sanni tab kura ka jira. Baara kɛ event.target ni ani event.relatedTarget ye walasa ka tablo active ani tab active tɛmɛnen (ni o bɛ sɔrɔ) laɲini. |
jiralen don | Nin ko in bɛ tasuma don tab jirali la tab jiralen kɔfɛ. Baara kɛ event.target ni ani event.relatedTarget ye walasa ka tablo active ani tab active tɛmɛnen (ni o bɛ sɔrɔ) laɲini. |
- $ ( 'a[data-toggle="tab"]' ). kan ( 'jiralen' , baara ( e ) { .
- e . laɲini // tab min bɛ baara kɛ
- e . relatedTarget // tab tɛmɛnen
- })
A lawulilen don ni jQuery.tipsy plugin ɲumanba ye min sɛbɛnna Jason Frame fɛ; Baarakɛminɛnw ye sɛgɛsɛgɛli kura ye, minnu tɛ u jigi da jaw kan, u bɛ baara kɛ ni CSS3 ye animationw kama, ani data-attributes sigida tɔgɔw marali kama.
Baarakɛcogo kunw na, baarakɛminɛnw ni popover data-apis bɛ opt in, o kɔrɔ ye ko i yɛrɛ ka kan k’u daminɛ .
I bolo digi jukɔrɔla yɔrɔw kan walasa ka baarakɛminɛnw lajɛ:
Tight pants next level keffiyeh n'a sɔrɔla i ma u mɛn. Foto cabine barbe cru denim letterpress vegan ciden sac stumptown. Foro-ka-tabali seitan, mcsweeney ka fixie sabatilen quinoa 8-bit ameriki finiw bɛ ni terry richardson vinyl chambray ye. Barbu stumptown, cardigans banh mi lomo sanpɛrɛnw. Tofu biodiesel williamsburg marfa, naani loko mcsweeney ka saniya vegan chambray. A tiɲɛ na ironic artisan whatever keytar , scenester foro-ka-tabali banksy Austin twitter bolo freegan cred raw denim kelen-origin kafe viral.
Ni i bɛ baara kɛ ni baarakɛminɛnw ni popovers ye ni Bootstrap donna kuluw ye, i bɛna container
(sɛbɛnni min bɛ duguma) sugandi walasa ka i yɛrɛ tanga kɔlɔlɔw ma minnu man ɲi.
Baarakɛminɛn in daminɛ JavaScript fɛ:
- $ ( '#misali' ). baarakɛminɛnw ( sugandiliw ) .
Sugandili bɛ se ka tɛmɛ data attributes walima JavaScript fɛ. Donanw cogoyaw kama, aw bɛ sugandi tɔgɔ fara data-
, i n’a fɔ a bɛ cogo min na data-animation=""
.
Tɔ̀gɔ | ka sɛbɛen masin na | fɔlɔ | cogojirali |
---|---|---|---|
animation (ɲɛnamaya kɛcogo ɲuman). | boolean ye | sɛbɛ | css fade transition dɔ kɛ baarakɛminɛnw kɔnɔ |
html ye | boolean ye | nkalon | html don baarakɛminɛnw kɔnɔ . Ni nkalon don, jquery ka text fɛɛrɛ bɛna kɛ ka kɔnɔkow don dom kɔnɔ. Baara kɛ ni sɛbɛnni ye ni i bɛ hami XSS binkanniw na. |
bilali sen kan | juru | baarakunda | 'san fɛ' | baarakɛminɛnw sigicogo - sanfɛ | duguma | kinin fɛ | jo |
sugandilikɛla | gaari | nkalon | Ni sugandili dɔ dira, baarakɛminɛnw ɲɛfɔli fɛnw bɛna di laɲini kofɔlenw ma. |
titiri | juru | baarakunda | '' '' . | default title value ni `title` taamasiyɛn tɛ yen |
ka ci | gaari | 'hover focus' ye. | baarakɛminɛnw bɛ daminɛ cogo min na - i ka | hover | sinsinnan | min bɛ fɛn bolo la. A kɔlɔsi ko ka tɛmɛn trigger mutliple, yɔrɔ danfaralen, trigger suguyaw. |
ka mɛ | jate | minɛn | 0 ye | delay jirali ni dogoli baarakɛminɛnw (ms) - o tɛ tali kɛ bololabaarakɛlaw ka daminɛ suguya la Ni nimɔrɔ dɔ dira, delay bɛ kɛ hide/show fila bɛɛ la Fɛnw jɔcogo ye: |
minɛn kɔnɔ | juru | nkalon | nkalon | A bɛ baarakɛminɛnw ɲɛfɔli fara fɛn kɛrɛnkɛrɛnnen dɔ kan |
- <a href = "#" data-toggle = "baarakɛminɛnw" title = "baarakɛminɛn fɔlɔw" > i bolo digi ne kan </a>
A bɛ baarakɛminɛn dɔ nɔrɔ fɛnw lajɛlen dɔ la.
A bɛ element dɔ ka baarakɛminɛnw jira.
- $ ( '#fɛn' ). baarakɛminɛnw ɲɛfɔli ( 'jira' ) .
A bɛ fɛn dɔ ka baarakɛminɛn dɔ dogo.
- $ ( '#fɛn' ). baarakɛminɛnw ɲɛfɔli ( 'dogo' ) .
A bɛ fɛn dɔ ka baarakɛminɛnw sɛgɛsɛgɛli wuli.
- $ ( '#fɛn' ). baarakɛminɛnw ɲɛfɔli ( 'toggle' ) .
A bɛ fɛn dɔ ka baarakɛminɛn dɔ dogo ani k’a Tiɲɛ.
- $ ( '#fɛn' ). baarakɛminɛnw ɲɛfɔli ( 'hakili' ) .
Aw bɛ kɔnɔkow dacogo misɛnninw fara ɲɔgɔn kan, i n’a fɔ iPad kan, fɛn o fɛn na walasa ka kunnafoni filananw sigi. Aw bɛ aw bolo digi butɔni kan walasa ka popover daminɛ. A bɛ Tooltip wajibiya ka don a kɔnɔ.
Sugandili naani bɛ yen: sanfɛ, kinin fɛ, duguma ani numan fɛ.
Sed posuere consectetur est ka bɔ lobortis la. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum (banakisɛfagalan min bɛ wele ko lacinia quam venenatis vestibulum).
Sed posuere consectetur est ka bɔ lobortis la. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum (banakisɛfagalan min bɛ wele ko lacinia quam venenatis vestibulum).
Sed posuere consectetur est ka bɔ lobortis la. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum (banakisɛfagalan min bɛ wele ko lacinia quam venenatis vestibulum).
Sed posuere consectetur est ka bɔ lobortis la. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum (banakisɛfagalan min bɛ wele ko lacinia quam venenatis vestibulum).
Marka si ma jira iko popovers tɛ sɔrɔ JavaScript ni kɔnɔkow la fɛn dɔ kɔnɔ data
.
Popovers baara kɛ JavaScript fɛ:
- $ ( '#misali' ). popover ( sugandiliw ) .
Sugandili bɛ se ka tɛmɛ data attributes walima JavaScript fɛ. Donanw cogoyaw kama, aw bɛ sugandi tɔgɔ fara data-
, i n’a fɔ a bɛ cogo min na data-animation=""
.
Tɔ̀gɔ | ka sɛbɛen masin na | fɔlɔ | cogojirali |
---|---|---|---|
animation (ɲɛnamaya kɛcogo ɲuman). | boolean ye | sɛbɛ | css fade transition dɔ kɛ baarakɛminɛnw kɔnɔ |
html ye | boolean ye | nkalon | Aw bɛ html don popover kɔnɔ . Ni nkalon don, jquery ka text fɛɛrɛ bɛna kɛ ka kɔnɔkow don dom kɔnɔ. Baara kɛ ni sɛbɛnni ye ni i bɛ hami XSS binkanniw na. |
bilali sen kan | juru | baarakunda | 'jo' | cogo min na ka popover sigi - sanfɛ | duguma | kinin fɛ | jo |
sugandilikɛla | gaari | nkalon | ni sugandili dɔ dira, baarakɛminɛnw ɲɛfɔli fɛnw bɛna di laɲini kofɔlenw ma |
ka ci | gaari | 'kliki' ye. | popover bɛ daminɛ cogo min na - i ka | hover | sinsinnan | min bɛ fɛn bolo la |
titiri | juru | baarakunda | '' '' . | default title value ni `title` fɛnsɛbɛn tɛ yen |
kɔnɔnafɛn | juru | baarakunda | '' '' . | kɔnɔkow nafa fɔlɔ ni `data-content` fɛnsɛbɛn tɛ yen |
ka mɛ | jate | minɛn | 0 ye | delay jirali ni a dogo popover (ms) - o tɛ tali kɛ bololabaarakɛlaw ka trigger suguya la Ni nimɔrɔ dɔ dira, delay bɛ kɛ hide/show fila bɛɛ la Fɛnw jɔcogo ye: |
minɛn kɔnɔ | juru | nkalon | nkalon | A bɛ popover fara fɛn kɛrɛnkɛrɛnnen dɔ kan |
Baarakɛcogo kunw na, Tooltip ani Popover data-apis bɛ opt in. N’i b’a fɛ ka baara kɛ n’u ye, i ka sugandili sugandilen dɔ jira dɔrɔn.
A bɛ popovers daminɛ ka ɲɛsin element collection dɔ ma.
A bɛ elements popover dɔ jira.
- $ ( '#fɛn' ). popover ( 'jira' ) .
A bɛ dogo ni elements popover ye.
- $ ( '#fɛn' ). popover ( 'dogo' ) .
Toggles an éléments popover.
- $ ( '#fɛn' ). popover ( 'kɔnɔnafili' ) .
A bɛ element dɔ ka popover dogo ani k’a tiɲɛ.
- $ ( '#fɛn' ). popover ( 'hakili' ) .
Aw bɛ dismiss baarakɛcogo fara lasɔmini cikanw bɛɛ kan ni nin plugin in ye.
Aw bɛ nin ni nin fɛn caman Changer ani ka segin ka a lajɛ. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus bɛ sigi amet fermentum la.
A’ ye lasɔmini dɔ bilali daminɛ JavaScript fɛ:
- $ ( ".kɔlɔsili" ). lasɔmini () .
Dɔrɔn dɔ fara data-dismiss="alert"
i ka dadon butɔni kan walasa ka a yɛrɛma ka alert close functionality di.
- <a kalasi = "dadon" data-dismiss = "kɔlɔsili" href = "#" > &waatiw; </a>
A bɛ lasɔminiw bɛɛ siri ni baarakɛcogo surun ye. Walasa i ka lasɔminiw ka ɲɛnamaya kɛ ni u datugulen don, i k’a lajɛ k’u ka .fade
and .in
class (kalanso) bɛ u kan kaban.
A bɛ lasɔmini dɔ datugu.
- $ ( ".kɔlɔsili" ). alert ( 'dakun' ) .
Bootstrap ka lasɔmini kalan bɛ ko damadɔw jira kɛnɛ kan walasa ka jɛgɛn ka don lasɔmini baarakɛcogo la.
Lajɛrɛ | Cogojirali |
---|---|
ka datugu | O ko in bɛ tasuma Bɔ o yɔrɔnin bɛɛ ni close misali fɛɛrɛ Weelela. |
da tugulen don | Nin ko in bɛ Bɔ ni lasɔmini Dafara (a bɛna css 'tɛmɛsiraw makɔnɔ ka Ban). |
- $ ( '#ne ka-lasɔmini' ). bind ( 'dafalen' , baara () { .
- // ka fɛn dɔ kɛ...
- })
Aw ye basigi cogoyaw sɔrɔ ani dɛmɛn min bɛ se ka wuli ka bɔ a nɔ na i n’a fɔ accordions ani navigation.
* A b’a ɲini Transitions plugin ka don a kɔnɔ.
Baara kɛli ni collapse plugin ye, an ye accordéon style widget nɔgɔman dɔ jɔ:
- <div kalasi = "accordion" id = "accordion2" >
- <div kalasi = "accordion-kulu" >
- <div class = "accordion-kunnafoni" >
- <a class = "accordion-toggle" data-toggle = "dafalen" donan-bangebagaw = "#accordion2" href = "#collapseOne" >
- Jɛkulu ka fɛn #1 min bɛ se ka da ɲɔgɔn kan
- </a>
- </div> ye
- <div id = "collapseOne" class = "accordion-farikolo bɛ bin" >
- <div kalasi = "accordion-kɔnɔna" >
- Anim pariatur cliché ye...
- </div> ye
- </div> ye
- </div> ye
- <div kalasi = "accordion-kulu" >
- <div class = "accordion-kunnafoni" >
- <a class = "accordion-toggle" data-toggle = "dafalen" donan-bangebagaw = "#accordion2" href = "#collapseTwo" >
- Jɛkulu min bɛ se ka da ɲɔgɔn kan, o ye fɛn #2 ye
- </a>
- </div> ye
- <div id = "collapseTwo" class = "akɔdi-farikolo bɔgɔlan" >
- <div kalasi = "accordion-kɔnɔna" >
- Anim pariatur cliché ye...
- </div> ye
- </div> ye
- </div> ye
- </div> ye
- ...
Aw bɛ se fana ka baara kɛ ni plugin ye ni accordéon taamasiyɛn tɛ. Aw bɛ butɔni dɔ kɛ ka fɛn wɛrɛ bonya ni a bincogo wuli.
- <butɔni suguya = "butɔni" kalasi = "btn btn-farati" data-toggle = "collapse" data-target = "#demo" >
- nɔgɔman min bɛ se ka wuli
- </button> ye
- <div id = "demo" kalasi = "dafalen don" > ... </div>
Dɔrɔn farali data-toggle="collapse"
ani a data-target
to element ka otomatiki assign control de un collapsible element. Attribut data-target
bɛ sɔn css sugandili ma walasa ka collapse kɛ a kan. Aw ye aw jija ka kalasi fara fɛn dɔ kan min bɛ collapse
se ka wuli. N'i b'a fɛ a ka da wuli, i ka kalansen wɛrɛ fara a kan in
.
Walasa ka kulu ɲɛnabɔli min bɛ i n’a fɔ akordeyɔn, o fara kunnafoni-falen-falen-falen-falen-falen kan, i ka kunnafoni-falen-falen-falen-falen-falen-falen fara a kan data-parent="#selector"
. Aw ye demo lajɛ walasa ka nin ye wale la.
A bɛ se ka baara kɛ ni bolo ye ni:
- $ ( ".dafalen" ). bɔgɔbɔgɔ () .
Sugandili bɛ se ka tɛmɛ data attributes walima JavaScript fɛ. Donanw cogoyaw kama, aw bɛ sugandi tɔgɔ fara data-
, i n’a fɔ a bɛ cogo min na data-parent=""
.
Tɔ̀gɔ | ka sɛbɛen masin na | fɔlɔ | cogojirali |
---|---|---|---|
bangebaga | sugandilikɛla | nkalon | Ni sugandili Kɛra o tuma na fɛn minnu bɛ Se ka Dabɔ bangebaga kofɔlen jukɔrɔ olu bɛɛ bɛ Dabɔ ni nin fɛn min bɛ Se ka Dabɔ o jiralen dòn. (a bɛ tali kɛ laadala acordion kɛcogo la) . |
toggle (toggle) kɛ | boolean ye | sɛbɛ | A bɛ fɛn min bɛ Se ka Dabɔ, o bɛ Yɛlɛma weleli kan |
A bɛ i ka kɔnɔkow baara i n’a fɔ fɛn min bɛ se ka da ɲɔgɔn kan. A bɛ sɔn sugandiliw ma minnu bɛ se ka kɛ object
.
- $ ( '#ne ka Collapsible' ). bɔgɔbɔgɔ ({
- toggle : nkalon
- })
A bɛ fɛn dɔ wuli ka bɔ a nɔ na ka taa jira walima ka dogo.
A bɛ fɛn dɔ jira min bɛ se ka wuli.
A bɛ fɛn dɔ dogo min bɛ Se ka Dabɔ.
Bootstrap ka collapse class bɛ ko damadɔw bɔ kɛnɛ kan ka ɲɛsin hooking into collapse functionality ma.
Lajɛrɛ | Cogojirali |
---|---|
k'a jira | O ko in bɛ tasuma Bɔ o yɔrɔnin bɛɛ ni show misali fɛɛrɛ Weelela. |
jiralen don | O ko in bɛ Fɔ ni fɛn dɔ Dònna 'kɔnɔ min bɛ Ye baarakɛla fɛ (a bɛna css 'tɛmɛsiraw makɔnɔ u ka ban). |
ka dogo | O ko in bɛ Fɔ o yɔrɔnin bɛɛ ni hide fɛɛrɛ in Weelela. |
dogolen | O ko in bɛ Fɔ ni 'fɛn dɔ dogolen dòn baarakɛla la (a bɛna css 'tɛmɛsiraw makɔnɔ ka Dafa). |
- $ ( '#ne ka Collapsible' ). kan ( 'dogolen' , baara () { .
- // ka fɛn dɔ kɛ...
- })
Slide jirali min bɛ duguma, o bɛ fɛn dɔ jira min bɛ wele ko plugin generic ani component min bɛ kɛ ka cycling kɛ fɛnw fɛ i n’a fɔ carousel.
- <div id = "ne kaKarosel" kalasi = "karosel slide" >
- <ol kalasi = "karɔsi-jiralanw" >
- <li data-target = "#myCarousel" data-slide-to = "0" kalasi = "baarakɛ" </li>
- <li kunnafoni-laɲini = "#myCarousel" kunnafoni-sɛbɛn-ka-bɔ = "1" </li>
- <li kunnafoni-laɲini = "#myCarousel" kunnafoni-sɛbɛn-ka-bɔ = "2" </li>
- </ol> , o ye
- <!-- Karɔsi fɛnw -->
- <div kalasi = "karɔsi-kɔnɔna" >
- <div kalasi = "fɛn min bɛ baara kɛ" > ... </div>
- <div kalasi = "fɛn" > ... </div>
- <div kalasi = "fɛn" > ... </div>
- </div> ye
- <!-- Karosel nav -->
- <a class = "karosel-kunnafoni kinin fɛ" href = "#ne kaKarosel" data-slide = "kɔrɔlen" > ‹ </a>
- <a kalasi = "karosel-kunnafoni kinin fɛ" href = "#ne kaKarosel" data-slide = "nata" > › </a>
- </div> ye
Baara kɛ ni data attributes ye walasa ka carousel jɔyɔrɔ kɔlɔsi nɔgɔya la. data-slide
bɛ sɔn daɲɛ kolomaw ma prev
walima next
, min bɛ slide jɔyɔrɔ Changer ka kɛɲɛ n'a jɔyɔrɔ ye sisan. O cogo kelen na, baara kɛ ni data-slide-to
ka tɛmɛ ni slide index raw ye ka taa carousel data-slide-to="2"
la , o min bɛ pan's slide position ka taa index kɛrɛnkɛrɛnnen dɔ la min bɛ daminɛ ni 0
.
Aw bɛ carousel wele ni bolo ye ni:
- $ ( '.karɔsi' ). karosel () .
Sugandili bɛ se ka tɛmɛ data attributes walima JavaScriptz fɛ. Donanw cogoyaw kama, aw bɛ sugandi tɔgɔ fara data-
, i n’a fɔ a bɛ cogo min na data-interval=""
.
Tɔ̀gɔ | ka sɛbɛen masin na | fɔlɔ | cogojirali |
---|---|---|---|
cɛmancɛ | nimɔrɔ | 5000 ye | Waati hakɛ min ka kan ka bila kɔfɛ fɛn dɔ bolicogo otomatiki la. Ni nkalon don, carousel tɛna cycle kɛ a yɛrɛma. |
ka jɔ | gaari | "hover" ye. | A bɛ carousel ka cyclisme jɔ sosɛti donta kan ani ka carousel ka cyclisme daminɛ kokura mouseleave kan. |
A bɛ carousel daminɛ ni options options ye object
ani ka cycle daminɛ fɛnw fɛ.
- $ ( '.karɔsi' ). karɔsili ({
- cɛmancɛ : san 2000
- })
A bɛ cycle kɛ carousel fɛnw kɔnɔ ka bɔ numan fɛ ka taa kinin fɛ.
A bɛ carousel bali ka boli ka tɛmɛ fɛnw fɛ.
A bɛ carousel cycle kɛ ka taa frame kɛrɛnkɛrɛnnen dɔ la (0 basigilen, a bɛ tali kɛ array dɔ la).
Sikiliw bɛ taa fɛn tɛmɛnen na.
Sikiliw bɛ taa fɛn nata la.
Bootstrap ka carousel kalan bɛ ko fila jira ka ɲɛsin hooking ka carousel baarakɛcogo ma.
Lajɛrɛ | Cogojirali |
---|---|
ka cɛɛnɛ | O ko in bɛ tasuma Bɔ o yɔrɔnin bɛɛ ni slide misali fɛɛrɛ in Weele. |
sɔgɔsɔgɔ | O ko in bɛ Fɔ ni karɔsili ye a ka slide transition (slide) tigɛli dafa. |
Plugin basigilen, min bɛ se ka bonya nɔgɔya la walasa ka teliya ka typeahead cɛɲiw dilan ni foroko sɛbɛnni sɛbɛnni suguya o suguya ye.
- <doncogo suguya = "sɛbɛn" data-provide = "suguya ɲɛfɛ" >
I b’a fɛ ka sigi autocomplete="off"
walasa ka navigatɔrɔn ka menu defaultw bali ka bɔ Bootstrap typeahead yɔrɔ la.
Donanw ka fɛnw fara ɲɔgɔn kan walasa ka fɛn dɔ sɛbɛn ni typeahead baarakɛcogo ye i n’a fɔ a jiralen bɛ cogo min na misali la sanfɛ.
Aw bɛ typeahead wele ni aw bolo ye ni:
- $ ( '.sɛbɛnni ɲɛfɛ' ). sɛbɛnni ɲɛfɛ () .
Sugandili bɛ se ka tɛmɛ data attributes walima JavaScript fɛ. Donanw cogoyaw kama, aw bɛ sugandi tɔgɔ fara data-
, i n’a fɔ a bɛ cogo min na data-source=""
.
Tɔ̀gɔ | ka sɛbɛen masin na | fɔlɔ | cogojirali |
---|---|---|---|
bununda | array, baarakɛcogo | [ ] . | Donanw sɔrɔyɔrɔ min ka kan ka ɲininkali kɛ a kan. A bɛ se ka kɛ sɛrɛw lajɛlen ye walima baarakɛcogo dɔ. Baara bɛ tɛmɛ dalilu fla kan, query nafa min bɛ donna-yɔrɔ la ani process weleli-yɔrɔ. Baarakɛcogo bɛ se ka baara kɛ ni waati kelen ye ni kunnafoni sɔrɔyɔrɔ seginni ye k’a ɲɛsin a yɛrɛ ma walima k’a kɛ cogo wɛrɛ la process weleli segin ka sɔsɔli kelen fɛ. |
minɛns | nimɔrɔ | 8 ye | Fɛn minnu ka kan ka jira yɔrɔ la, olu hakɛ maksimali. |
minJanya | nimɔrɔ | 1 ye | Karamɔgɔ janya fitinin min ka kan ka kɛ sanni ka hakilinaw daminɛ minnu bɛ kɛ ka u yɛrɛ dafa |
matchɛri | baarakunda | case insensitive (fɔcogo min tɛ fɛn ye). | Fɛɛrɛ min bɛ Kɛ k’a Dɔn ni ɲininkali dɔ bɛ Bɛn fɛn dɔ ma. A bɛ Sɔn sɔsɔli kelen ma, o item min bɛ ɲininkali kɔrɔbɔ. Aw bɛ se ka ɲininkali kɛ sisan ni this.query . Segin boolean dɔ kan true ni ɲininkali ye bɛnkan ye. |
sɛgɛsɛgɛlikɛlan | baarakunda | bɛnkan tigitigi, sɛbɛnnibolow ni sɛbɛnnibolow tɛ kelen ye |
Fɛɛrɛ min bɛ kɛ ka autocomplete jaabiw labɛn. A bɛ Sɔn sɔsɔli kelen ma items ani a bɛ ni typeahead instance ka scope ye. Aw bɛ ɲininkali kɛ sisan ni this.query . |
updater (kurayabaga). | baarakunda | bɛ segin fɛn sugandilen kan | Fɛɛrɛ min bɛ kɛ ka fɛn sugandilen segin. A bɛ Sɔn sɔsɔli kelen ma, o item ani a bɛ ni typeahead instance ka scope ye. |
fɛn min bɛ ɲɛfɔli kɛ | baarakunda | bɛ ɲɔgɔndan dafalenw bɛɛ jira | Fɛɛrɛ min bɛ kɛ ka autocomplete jaabiw jira. A bɛ Sɔn sɔsɔli kelen ma item ani a bɛ ni typeahead instance ka scope ye. Ka kan ka segin html kan. |
A bɛ donnakow daminɛ ni typeahead ye.
Subnavigation min bɛ kinin fɛ, o ye affix plugin ka demo ɲɛnama ye.
Walasa ka affix kɛcogo fara nɔgɔya la fɛn o fɛn kan, data-spy="affix"
i b’a fɛ ka fɛn min sɛgɛsɛgɛ dɔrɔn, i ka o fara a kan. O kɔfɛ, baara kɛ ni offsets ye walasa k’a ɲɛfɔ waati min na i ka kan ka fɛn dɔ pinɛcogo wuli ani ka a ban.
- <div data-spy = "affix" kunnafoni-falen-falen-sanfɛ = "200" > ... </div>
affix
,
affix-top
, ani
affix-bottom
. Aw ye aw hakili to a la ka bangebaga dɔ lajɛ min bɛ se ka bin ni affix bɛ daminɛ ka don bawo a bɛ kɔnɔkow bɔ ɲɛ in bolicogo nɔgɔman na.
Affix plugin wele JavaScript fɛ:
- $ ( '#navbar' ye ) ye. farankan () .
Sugandili bɛ se ka tɛmɛ data attributes walima JavaScript fɛ. Donanw cogoyaw kama, aw bɛ sugandi tɔgɔ fara data-
, i n’a fɔ a bɛ cogo min na data-offset-top="200"
.
Tɔ̀gɔ | ka sɛbɛen masin na | fɔlɔ | cogojirali |
---|---|---|---|
offset (fɔcogo ɲuman). | jate | baarakɛcogo | minɛn | 10 ye | Pixels ka offset ka bɔ ekran na ni jatebɔ jɔyɔrɔ scroll. Ni jateden kelen dira, offset bɛna kɛ sanfɛ ni numan fɛ. Walasa ka sira kelen lamɛn, walima ka fɛn caman di minnu tɛ kelen ye, i bɛ fɛn dɔ di dɔrɔn offset: { x: 10 } . Baara kɛ ni baarakɛcogo dɔ ye ni aw mago bɛ ka offset di ni fanga ye (nafa bɛ sɔrɔ dilancogo dɔw la minnu bɛ jaabi di). |