Leeta ebitundu bya Bootstrap mu bulamu-kati nga olina 13 custom jQuery plugins.
Plugins zisobola okuteekebwamu kinnoomu (wadde nga ezimu zeetaaga okwesigamizibwa), oba zonna omulundi gumu. bootstrap.js ne bootstrap.min.js zombi zirimu plugins zonna mu fayiro emu.
Osobola okukozesa Bootstrap plugins zonna okuyita mu markup API yokka nga towandiise layini emu eya JavaScript. Eno ye API ya Bootstrap eya kiraasi esooka era yandibadde esooka okulowoozaako ng’okozesa plugin.
Ekyo kyogeddwa, mu mbeera ezimu kiyinza okuba ekirungi okuggyako omulimu guno. Nolwekyo, era tuwa obusobozi okulemesa API attribute ya data nga tusumulula ebibaddewo byonna ku mubiri namespaced ne `'data-api'`. Kino kifaanana bwe kiti:
- $ ( 'omubiri' ). okuggyako ( '.data-api' ) .
Ekirala, okutunuulira plugin eyeetongodde, ssaamu erinnya lya plugin nga ekifo ky'amannya wamu n'ekifo ky'amannya kya data-api nga kino:
- $ ( 'omubiri' ). off ( '.okulabula.data-api' ) .
Era tukkiriza nti olina okusobola okukozesa Bootstrap plugins zonna okuyita mu JavaScript API yokka. API zonna ez'olukale nkola emu, eziteekebwako enjegere, era zizzaayo okukung'aanya okwakolebwako.
- $ ( ".btn.akabi" ). button ( "okukyusakyusa" ). addClass ( "amasavu" ) .
Enkola zonna zirina okukkiriza ekintu eky'okulonda eky'okwesalirawo, olunyiriri olugenderera enkola entongole, oba tewali kintu kyonna (ekitandika plugin n'enneeyisa eya bulijjo):
- $ ( "#Modal yange" ). modal () // etandikiddwawo n'ebisookerwako
- $ ( "#Modal yange" ). modal ({ keyboard : false }) // etandikiddwawo nga tewali kibboodi
- $ ( "#Modal yange" ). modal ( 'show' ) // etandika era eyita okulaga amangu ddala
Buli plugin era eraga omuzimbi waayo embisi ku kintu kya `Constructor`: $.fn.popover.Constructor
. Bw'oba oyagala okufuna ekifaananyi kya plugin ekimu, kiggye butereevu okuva mu elementi: $('[rel=popover]').data('popover')
.
Oluusi kyetaagisa okukozesa Bootstrap plugins ne UI frameworks endala. Mu mbeera zino, okutomeragana kw'ekifo ky'amannya kuyinza okubaawo oluusi n'oluusi. Kino bwe kibaawo, oyinza okuyita .noConflict
ku plugin gy’oyagala okuzzaawo omuwendo gwayo.
- var bootstrapButaamu = $ . fn . button . noConflict () // zzaayo $.fn.button ku muwendo ogwaweebwa emabegako
- $ . fn . bootstrapBtn = bootstrapButton // okuwa $().bootstrapBtn omulimu gwa bootstrap
Bootstrap egaba ebibaddewo eby'enjawulo ku bikolwa ebisinga obungi eby'enjawulo ebya plugin. Okutwalira awamu, bino bijja mu ngeri etaliiko nkomerero n’enkomerero eyayita - nga enkomerero (ex. show
) etandikibwawo ku ntandikwa y’ekintu ekibaawo, ate engeri yaayo ey’ekitundu ekiyise (ex. shown
) n’etandika ku kumaliriza ekikolwa.
Ebibaawo byonna ebitaliiko nkomerero biwa enkola ya preventDefault. Kino kiwa obusobozi okuyimiriza okukola ekikolwa nga tekinnatandika.
- $ ( '#Modal yange' ). ku ( 'laga' , omulimu ( e ) {
- singa (! data ) okuddamu e . preventDefault () // eyimiriza modal okulagibwa
- }) .
Ku bikolwa eby’enkyukakyuka ebyangu, ssaamu bootstrap-transition.js omulundi gumu ku mabbali ga fayiro za JS endala. Bw’oba okozesa bootstrap.js ekung’aanyiziddwa (oba ekendeezeddwa) , tekyetaagisa kussaamu kino—kyaaliwo dda.
Ebyokulabirako ebitonotono ku plugin y'enkyukakyuka:
Modals zirongooseddwa, naye zikyukakyuka, dialog prompts nga zirina enkola entono ezeetaagisa n'okusooka okugezi.
Modal ekoleddwa nga erimu omutwe, omubiri, n'ekibinja ky'ebikolwa mu wansi.
Omubiri gumu omulungi...
- <div class = "okuzikira okukweka okw'engeri" >
- <div class = "omutwe-omuko" >
- < ekika kya button = "button" class = "okuggalawo" data-okugoba = "modal" aria-okukwekebwa = "kituufu" > × </button>
- <h3> Omutwe gwa modali </h3>
- </div> nga bwe kiri
- <div class = "omubiri-ogw'engeri" >
- <p> Omubiri gumu omulungi... </p>
- </div> nga bwe kiri
- <div class = "omutendera-ekigere" >
- <a href = "#" ekibiina = "btn" > Ggalawo </a>
- <a href = "#" class = "btn btn-primary" > Teeka enkyukakyuka </a>
- </div> nga bwe kiri
- </div> nga bwe kiri
Toggle a modal nga oyita mu JavaScript nga onyiga button wansi. Kijja kuseeyeeya wansi era kizike okuva waggulu ku lupapula.
- <!-- Button okutandikawo modal -->
- <a href = "#myModal" role = "button" class = "btn" data-toggle = "engeri" > Okutongoza enkola y'okulaga </a>
- <!-- Omukozi -->
- <div id = "myModal" class = "modal okukweka okuzikira" tabindex = "-1" omulimu = "okukubaganya ebirowoozo" aria-labelledby = "myModalLabel" aria-okukwekebwa = "kituufu" >
- <div class = "omutwe-omuko" >
- < ekika kya button = "button" class = "okuggalawo" data-okugoba = "modal" aria-okukwekebwa = "kituufu" > × </button>
- <h3 id = "myModalLabel" > Omutwe gwa Modal </h3>
- </div> nga bwe kiri
- <div class = "omubiri-ogw'engeri" >
- <p> Omubiri gumu omulungi... </p>
- </div> nga bwe kiri
- <div class = "omutendera-ekigere" >
- <button class = "btn" data-dismiss = "modal" aria-okukwekebwa = "kituufu" > Ggalawo </button>
- <button class = "btn btn-primary" > Teeka enkyukakyuka </button>
- </div> nga bwe kiri
- </div> nga bwe kiri
Kozesa modal nga towandiise JavaScript. Teeka data-toggle="modal"
ku elementi y'ekifuga, nga button, wamu ne a data-target="#foo"
oba href="#foo"
okutunuulira modal eyeetongodde okukyusakyusa.
- < ekika kya button = "button" data-toggle = "modal" data-target = "#myModal" > Okutongoza enkola </button>
Kuba modal eriko id myModal
nga erina layini emu eya JavaScript:
- $ ( '#Modal yange' ). modal ( eby'okulondako ) .
Ebyokulonda bisobola okuyisibwa nga biyita mu data attributes oba JavaScript. Ku bikwata ku data, ssaako erinnya ly'okulonda ku data-
, nga mu data-backdrop=""
.
Erinnya | okuwandiika | okukosamu | okunnyonnyola |
---|---|---|---|
ekifaananyi eky’emabega | boolean | kituufu | Mulimu ekintu ekiyitibwa modal-backdrop element. Ekirala, lambika static ku backdrop etaggalawo modal ku click. |
ekitabo ekikwata ku kibboodi | boolean | kituufu | Eggalawo modal nga escape key enyigiddwa |
okulaga | boolean | kituufu | Alaga modal nga etandikiddwawo. |
limooti | ekkubo | -kyaamu | Singa url eri ewala eweebwa, ebirimu bijja kutikkibwa nga biyita mu
|
Ekola ebirimu byo nga modal. Akkiriza eby'okulonda eby'okwesalirawo object
.
- $ ( '#Modal yange' ). modal ({ ) .
- keyboard : eky'obulimba
- }) .
Mu ngalo ekyusakyusa modal.
- $ ( '#Modal yange' ). modal ( 'okukyusakyusa' ) .
Mu ngalo aggulawo modal.
- $ ( '#Modal yange' ). modal ( 'okulaga' ) .
Mu ngalo akweka modal.
- $ ( '#Modal yange' ). modal ( 'okukweka' ) .
Bootstrap's modal class eraga ebitonotono ebibaawo olw'okuyunga mu nkola ya modal.
Omukolo | Okunnyonnyola |
---|---|
okulaga | Ekintu kino kikuba amangu ddala nga show enkola ya instance eyitiddwa. |
eragiddwa | Ekintu kino kikubwa nga modal ekoleddwa okulabika eri omukozesa (ejja kulinda enkyukakyuka za css okuggwa). |
okweekweeka | Ekintu kino kikubwa amangu ddala nga hide enkola ya instance eyitiddwa. |
okukweekebwa | Ekintu kino kikubwa nga modal emaze okukwekebwa okuva eri omukozesa (ejja kulinda enkyukakyuka za css okuggwa). |
- $ ( '#Modal yange' ). ku ( 'ekikwekeddwa' , omulimu () {
- // kola ekintu...
- }) .
Okwongerako menus ezikka kumpi ku kintu kyonna ne plugin eno ennyangu, omuli navbar, tabs, n’empeke.
Yongera data-toggle="dropdown"
ku link oba button okukyusa dropdown.
- <div class = "okugwa wansi" >
- <a class = "okusuula-okukyusa" data-toggle = "okusuula" href = "#" > Ekiziyiza okugwa </a>
- <ul kiraasi = "menyu-egwa wansi" omulimu = "menu" aria-labelledby = "dLabel" >
- ...
- </ul>
- </div> nga bwe kiri
Okukuuma URL nga tezifudde, kozesa data-target
ekintu mu kifo kya href="#"
.
- <div class = "okugwa wansi" >
- <a class = "okugwa-okukyusa" id = "dLabel" omulimu = "button" data-okukyusa = "okugwa" data-ekigendererwa = "#" href = "/olupapula.html" >
- Okugwa wansi
- <b kiraasi = "okulabirira" ></b>
- </a>
- <ul kiraasi = "menyu-egwa wansi" omulimu = "menu" aria-labelledby = "dLabel" >
- ...
- </ul>
- </div> nga bwe kiri
Kuba ku bigenda okukka wansi ng’oyita mu JavaScript:
- $ ( '.okusuula-okukyusa' ). okugwa wansi () .
Tewali
Api ya pulogulaamu ey'okukyusakyusa menu ku navbar eweereddwa oba okutambulira ku tabbed.
ScrollSpy plugin ya kulongoosa nav targets mu ngeri ey’otoma okusinziira ku scroll position. Ssenda ekitundu wansi wa navbar era olabe enkyukakyuka ya kiraasi ekola. Ebintu ebitonotono ebigwa wansi nabyo bijja kulagibwa.
Ad leggings keytar, brunch id art akabaga ka dolor labore. Pitchfork yr enim lo-fi nga tebannaba kutunda qui. Tumblr eddembe ly'obugaali okuva ku faamu okutuuka ku mmeeza kyonna. Anim keffiyeh kaadi ya carles. Velit seitan mcsweeney's ekifaananyi ekifo 3 omusege omwezi irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui osanga toziwuliddeko et cardigan ssente z'obwesige culpa biodiesel wes anderson aesthetic. Nihil alina ttatu accusamus, cred irony biodiesel keffiyeh omukozi w'emikono ullamco ekivaamu.
Veniam marfa ebirevu skateboard, adipisicing ekirevu kya fugiat velit ekirevu eky’ekika kya pitchfork. Freegan ekirevu aliqua cupidatat ekirevu kya mcsweeney. Cupidatat abantu bana loko nisi, ea helvetica nulla carles. Loole y'emmere ya ssweeta ya cosby eriko ttatu, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 eby’okwewunda. Carles non aesthetic okukola dduyiro quis gentrify. Brooklyn adipisicing eby'emikono bbiya vice keytar deserunt.
Occaecat ekika kya commodo ekiyitibwa ekirungo ekiyitibwa occaecat. Fap ebyemikono bbiya deserunt skateboard ea. Lomo obugaali eddembe adipisicing banh mi, velit ea sunt omutendera oguddako locavore kaawa ow'ensibuko emu mu magna veniam. Obulamu obw'amaanyi id vinyl, echo ppaaka consequat quis aliquip banh mi ekifuba. Vero VHS est okusiiga amasanyalaze. Consectetur nisi DIY minim ensawo y'omubaka. Cred ex mu, okuwangaala 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 ensawo y'omubaka marfa kyonna delectus loole y'emmere. Sapiente synth id okulowooza nti. Locavore sed helvetica cliche irony, okubwatuka osanga towuliddeko consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat nga tebannaba kutunda, terry richardson proident brunch nesciunt quis cosby ssweeta pariatur keffiyeh ut helvetica omukubi w'emikono. Cardigan craft bbiya seitan nga yeetegefu velit. VHS chambray laboris ekika kya veniam eky’ekiseera. Anim mollit minim commodo ullamco okubwatuka kw'okubwatuka.
Okusobola okwanguyirwa okwongerako enneeyisa ya scrollspy ku topbar navigation yo, just add data-spy="scroll"
ku element gyoyagala okuketta (okusinga kino kyandibadde mubiri) era data-target=".navbar"
okulonda nav ki gy'okozesa. Ojja kwagala okukozesa scrollspy .nav
n'ekitundu.
- <omubiri data-spy = "okutambula" data-ekigendererwa = ".navbar" > ... </omubiri>
Kuba essimu eri omuwandiisi w’ebitabo ng’oyita mu JavaScript:
- $ ( '#navbar' ). scrollspy () .
<a href="#home">home</a>
alina okukwatagana n’ekintu ekiri mu dom nga
<div id="home"></div>
.
Bw'oba okozesa scrollspy wamu n'okugattako oba okuggyawo ebintu okuva mu DOM, ojja kwetaaga okuyita enkola y'okuzza obuggya nga bwe kityo:
- $ ( '[data-spy="okutambula"]' ). buli ( omulimu () { .
- var $ omukessi = $ ( kino ). scrollspy ( 'okuzza obuggya' ) .
- });
Ebyokulonda bisobola okuyisibwa nga biyita mu data attributes oba JavaScript. Ku bikwata ku data, ssaako erinnya ly'okulonda ku data-
, nga mu data-offset=""
.
Erinnya | okuwandiika | okukosamu | okunnyonnyola |
---|---|---|---|
offset | omuwendo | 10. 10 | Pixels oku offset okuva waggulu nga obala ekifo ky'omuzingo. |
Omukolo | Okunnyonnyola |
---|---|
okukola | Ekintu kino kikuba omuliro buli ekintu ekipya lwe kifuuka ekikozesebwa scrollspy. |
Okwongerako enkola ya tabu ey’amangu, ekyukakyuka okukyuka okuyita mu bitundu by’ebirimu eby’omu kitundu, wadde ng’oyita mu menyu ezikka.
Raw denim osanga toziwuliddeko jean shorts Austin. Nesciunt tofu stumptown aliqua, okuyonja omukugu mu kukola eby’amaguzi eby’edda. Ebirevu cliche ekiseera, williamsburg carles vegan helvetica. Reprehenderit omunyama retro keffiyeh omukwasi w'ebirooto synth. Ssweeta ya cosby eu banh mi, qui irure terry richardson eyali squid. Aliquip placeat omusajja omulala ayitibwa salvia cillum iphone. Seitan aliquip quis cardigan engoye z'omumerika, omunyama 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.
Ssobozesa tabu eziriko tabba ng’oyita mu JavaScript (buli tabu yeetaaga okukozesebwa kinnoomu):
- $ ( '#Tab yange a' ). click ( omulimu ( e ) { .
- e . okuziyizaEkisookerwako ();
- $ ( kino ). tab ( 'laga' );
- }) .
Osobola okukola tabu ssekinnoomu mu ngeri eziwerako:
- $ ( '#Tab yange a[href="#profile"]' ). tab ( 'laga' ); // Londa tab okusinziira ku linnya
- $ ( '#Tab yange a:esooka' ). tab ( 'laga' ); // Londa ekitundu ekisooka
- $ ( '#Tab yange a:esembayo' ). tab ( 'laga' ); // Londa ekitundu ekisembayo
- $ ( '#Tab yange li:eq (2) a' ). tab ( 'laga' ); // Londa ekitundu ekyokusatu (0-indexed) .
Osobola okukola tab oba pill navigation nga towandiise JavaScript yonna nga omala kulaga data-toggle="tab"
oba data-toggle="pill"
ku elementi. Okwongera nav
ne nav-tabs
classes ku tab ul
kijja kukozesa Bootstrap tab styling.
- <ul ekibiina = "nav nav-tabs" >
- <li><a href = "#awaka" data-toggle = "tabu" > Awaka </a></li>
- <li><a href = "#profile" data-toggle = "tabu" > Ebifaananyi </a></li>
- <li><a href = "#obubaka" data-toggle = "tabu" > Obubaka </a></li>
- <li><a href = "#ensengeka" data-toggle = "tabu" > Ensengeka </a></li>
- </ul>
Ekola ekintu kya tabu n'ekintu ekirimu. Tab erina okuba ne oba a data-target
oba an href
targeting a container node mu DOM.
- <ul ekibiina = "nav nav-tabs" id = "Tab yange" >
- <li class = "ekola" ><a href = "#awaka" > Awaka </a></li>
- <li><a href = "#profile" > Ebifaananyi </a></li>
- <li><a href = "#obubaka" > Obubaka </a></li>
- <li><a href = "#ensengeka" > Ensengeka </a></li>
- </ul>
- <div class = "ebirimu tabu" >
- <div class = "tabu-pane ekola" id = "awaka" > ... </div>
- <div kiraasi = "tabu-pane" id = "profayiro" > ... </div>
- <div class = "tabu-pane" id = "obubaka" > ... </div>
- <div class = "tab-pane" id = "ensengeka" > ... </div>
- </div> nga bwe kiri
- <ekiwandiiko>
- $ ( omulimu () { .
- $ ( '#Tab yange a:esembayo' ). tab ( 'laga' );
- }) .
- </script>
Omukolo | Okunnyonnyola |
---|---|
okulaga | Ekintu kino kikuba omuliro ku tab show, naye nga tab empya tennalagibwa. Kozesa event.target ne event.relatedTarget okutunuulira tabu ekola ne tabu ekola eyasooka (bwe kiba nga kiriwo) mu kulondako. |
eragiddwa | Ekintu kino kikuba omuliro ku tab show oluvannyuma lwa tab okulagibwa. Kozesa event.target ne event.relatedTarget okutunuulira tabu ekola ne tabu ekola eyasooka (bwe kiba nga kiriwo) mu kulondako. |
- $ ( 'a[data-okukyusakyusa="tabu"]' ). ku ( 'alagiddwa' , omulimu ( e ) {
- e . target // tab ekoleddwa
- e . relatedTarget // ekitundu ekiyise
- }) .
Nga efunye okubudaabudibwa okuva mu nkola ennungi ennyo eya jQuery.tipsy eyawandiikibwa Jason Frame; Tooltips ye nkyusa erongooseddwa, etasinziira ku bifaananyi, ekozesa CSS3 ku animations, ne data-attributes okutereka emitwe egy'omu kitundu.
Olw'ensonga z'okukola, tooltip ne popover data-apis zibeera opt in, ekitegeeza nti olina okuzitandika ggwe kennyini .
Hover ku links wammanga olabe ebikozesebwa:
Tight pants next level keffiyeh osanga toziwuliddeko . Ekifaananyi ekibanda ekirevu embisi denim letterpress vegan omubaka ensawo stumptown. Seitan okuva ku faamu okutuuka ku mmeeza, engoye za mcsweeney eziyitibwa fixie sustainable quinoa 8-bit american apparel zirina terry richardson vinyl chambray. Ekirevu stumptown, cardigans banh mi lomo okubwatuka. Tofu biodiesel williamsburg marfa, bana loko mcsweeney's okuyonja vegan chambray. A really ironic artisan whatever keytar , scenester faamu-ku-mmeeza banksy Austin twitter okukwata freegan cred embisi denim ensibuko emu kaawa viral.
Nga okozesa obukodyo bw'ebikozesebwa ne popovers n'ebibinja by'okuyingiza Bootstrap, ojja kuba olina okuteekawo container
(ewandiikiddwa wansi) eky'okulonda okwewala ebizibu by'otayagala.
Trigger the tooltip nga oyita mu JavaScript:
- $ ( '#ekyokulabirako' ). tooltip ( eby'okulonda ) .
Ebyokulonda bisobola okuyisibwa nga biyita mu data attributes oba JavaScript. Ku bikwata ku data, ssaako erinnya ly'okulonda ku data-
, nga mu data-animation=""
.
Erinnya | okuwandiika | okukosamu | okunnyonnyola |
---|---|---|---|
okukola ebifaananyi ebirina obulamu | boolean | kituufu | kozesa enkyukakyuka ya css fade ku tooltip |
html | boolean | -kyaamu | Teeka html mu tooltip. Bwe kiba kya bulimba, enkola ya jquery text ejja kukozesebwa okuyingiza ebirimu mu dom. Kozesa ebiwandiiko bw'oba weeraliikirira obulumbaganyi bwa XSS. |
okuteekebwa mu kifo | olunyiriri | enkola | 'waggulu' | engeri y'okuteeka ekiwandiiko ky'ebikozesebwa - waggulu | wansi | ku kkono | kituufu |
omusunsuzi | akaguwa | -kyaamu | Singa omusunsula aweebwa, ebintu ebikozesebwa bijja kuweebwa ebigendererwa ebiragiddwa. |
omutwe | olunyiriri | enkola | '' . | omuwendo gw'omutwe ogusookerwako singa `title` tag tebaawo |
okusiikula | akaguwa | 'okussa essira ku 'hover'. | engeri tooltip gy'etandikibwamu - nyweza | hover | okussa essira | maniyo. Weetegereze gwe case pass trigger mutliple, ekifo kyawuddwamu, ebika bya trigger. |
okulwawo | ennamba | ekintu | 0. | okulwawo okulaga n'okukweka tooltip (ms) - tekwata ku kika kya manual trigger Singa ennamba eweebwa, okulwawo kukozesebwa ku byombi okukweka/okulaga Ensengeka y’ekintu eri nti: |
ekintu ekirimu ebintu | olunyiriri | -kyaamu | -kyaamu | Egattako ekintu ekikozesebwa ku kintu ekigere |
- <a href = "#" data-toggle = "ekintu ekikozesebwa" title = "ekikozesebwa ekisooka" > hover over me </a>
Egattako omukwasi w'ebikozesebwa ku kukungaanya elementi.
Abikkula ekiwandiiko ky'ekintu ekiyitibwa tooltip.
- $ ( '#ekintu' ). tooltip ( 'laga' ) .
Ekweka ekiwandiiko ky'ekintu ekiyitibwa tooltip.
- $ ( '#ekintu' ). tooltip ( 'kwekweka' ) .
Ekyusakyusa ekintu ekiyitibwa tooltip.
- $ ( '#ekintu' ). tooltip ( 'okukyusa' ) .
Ekweka n'okusaanyaawo ekintu ekiyitibwa tooltip.
- $ ( '#ekintu' ). tooltip ( 'okusaanyaawo' ) .
Okwongerako obutonotono obubikkiddwako ebirimu, ng’ebyo ebiri ku iPad, ku kintu kyonna eky’okuteeka amawulire ag’okubiri. Hover ku button okutandika popover. Yeetaaga Tooltip okuteekebwamu.
Enkola nnya ziriwo: waggulu, ku ddyo, wansi, ne kkono nga zikwatagana.
Sed posuere consectetur esangibwa mu kifo ekiyitibwa lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia ekisenge ky’omu lubuto ekiyitibwa vestibulum.
Sed posuere consectetur esangibwa mu kifo ekiyitibwa lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia ekisenge ky’omu lubuto ekiyitibwa vestibulum.
Sed posuere consectetur esangibwa mu kifo ekiyitibwa lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia ekisenge ky’omu lubuto ekiyitibwa vestibulum.
Sed posuere consectetur esangibwa mu kifo ekiyitibwa lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia ekisenge ky’omu lubuto ekiyitibwa vestibulum.
Tewali markup eragiddwa nga popovers zikolebwa okuva mu JavaScript n'ebirimu munda mu data
attribute.
Ssobozesa popovers nga oyita mu JavaScript:
- $ ( '#ekyokulabirako' ). popover ( eby'okulondako ) .
Ebyokulonda bisobola okuyisibwa nga biyita mu data attributes oba JavaScript. Ku bikwata ku data, ssaako erinnya ly'okulonda ku data-
, nga mu data-animation=""
.
Erinnya | okuwandiika | okukosamu | okunnyonnyola |
---|---|---|---|
okukola ebifaananyi ebirina obulamu | boolean | kituufu | kozesa enkyukakyuka ya css fade ku tooltip |
html | boolean | -kyaamu | Teeka html mu popover. Bwe kiba kya bulimba, enkola ya jquery text ejja kukozesebwa okuyingiza ebirimu mu dom. Kozesa ebiwandiiko bw'oba weeraliikirira obulumbaganyi bwa XSS. |
okuteekebwa mu kifo | olunyiriri | enkola | 'kituufu' | engeri y'okuteeka popover - waggulu | wansi | ku kkono | kituufu |
omusunsuzi | akaguwa | -kyaamu | singa omusunsula aweebwa, ebintu ebikozesebwa bijja kuweebwa ebigendererwa ebiragiddwa |
okusiikula | akaguwa | 'nyiga'. | engeri popover gy'etandika - nyweza | hover | okussa essira | maniyo |
omutwe | olunyiriri | enkola | '' . | omuwendo gw'omutwe ogusookerwako singa ekintu `title` tekibaawo |
okwesiima | olunyiriri | enkola | '' . | omuwendo gw'ebirimu ogusookerwako singa ekintu kya `data-content` tekibaawo |
okulwawo | ennamba | ekintu | 0. | okulwawo okulaga n'okukweka popover (ms) - tekukwata ku kika kya manual trigger Singa ennamba eweebwa, okulwawo kukozesebwa ku byombi okukweka/okulaga Ensengeka y’ekintu eri nti: |
ekintu ekirimu ebintu | olunyiriri | -kyaamu | -kyaamu | Agattako popover ku elementi eyeetongodde |
Olw'ensonga z'okukola, Tooltip ne Popover data-apis zibeera opt in. Bw'oba oyagala okuzikozesa just specify a selector option.
Etandikawo popovers olw'okukung'aanya elementi.
Abikkula ekintu ekiyitibwa elements popover.
- $ ( '#ekintu' ). popover ( 'okulaga' ) .
Akweka ekintu ekiyitibwa elements popover.
- $ ( '#ekintu' ). popover ( 'kwekweka' ) .
Ekyusakyusa ekintu ekiyitibwa elements popover.
- $ ( '#ekintu' ). popover ( 'okukyusakyusa' ) .
Akweka era asaanyaawo popover ya elementi.
- $ ( '#ekintu' ). popover ( 'okusaanyaawo' ) .
Okwongerako enkola y'okugoba ku bubaka bwonna obw'okulabula ne plugin eno.
Kyusa kino ne kiri oddemu ogezeeko. Duis mollis, est non commodo luctus, nisi erat ekika ky’omugongo, eget lacinia odio sem nec elit. Cras mattis consectetur purus etuula mu kizimbulukusa.
Ssobozesa okugoba okulabula ng'oyita mu JavaScript:
- $ ( ".okulabula" ). okulabula () .
Just add data-dismiss="alert"
ku close button yo okuwa automatically okuwa alert close functionality.
- <a class = "okuggalawo" data-dismiss = "okulabula" href = "#" > &emirundi; </a>
Azinga okulabula kwonna n'emirimu egy'okumpi. Okusobola okuba n’okulabula kwo animate out nga kuggaddwa, kakasa nti balina the .fade
and .in
class eyakozesebwa dda ku zo.
Aggalawo okulabula.
- $ ( ".okulabula" ). alert ( 'okuggalawo' ) .
Bootstrap's alert class eraga ebitonotono ebibaawo olw'okukwata mu nkola y'okulabula.
Omukolo | Okunnyonnyola |
---|---|
okuggalawo | Ekintu kino kikuba amangu ddala nga close enkola ya instance eyitiddwa. |
eggaddwawo | Ekintu kino kikubwa nga okulabula kuggaddwa (kijja kulinda enkyukakyuka za css okuggwa). |
- $ ( '#okulabula kwange' ). bind ( 'kiggaddwa' , omulimu () { .
- // kola ekintu...
- }) .
Funa emisono egy’omusingi n’obuwagizi obukyukakyuka obw’ebitundu ebiyinza okugwa nga accordions ne navigation.
* Yeetaaga plugin ya Transitions okuteekebwamu.
Nga tukozesa collapse plugin, twazimba widget ennyangu ey’omulembe gwa accordion:
- <div class = "accordion" id = "akakoodi2" >
- <div class = "ekibinja-eky'akakodiyo" >
- <div class = "omutwe gwa accordion" >
- <a class = "accordion-toggle" data-toggle = "okugwa" data-omuzadde = "#accordion2" href = "#okugwaOmu" >
- Ekintu ky'ekibinja ekiyinza okugwa #1
- </a>
- </div> nga bwe kiri
- <div id = "collapseOne" class = "okugwa-omubiri-okugwa mu" >
- <div class = "akakoodi-omunda" >
- Anim pariatur ekintu ekitali kya bulijjo...
- </div> nga bwe kiri
- </div> nga bwe kiri
- </div> nga bwe kiri
- <div class = "ekibinja-eky'akakodiyo" >
- <div class = "omutwe gwa accordion" >
- <a class = "accordion-okukyusakyusa" data-toggle = "okugwa" data-omuzadde = "#accordion2" href = "#okugwaBbiri" >
- Ekintu ky'ekibinja ekiyinza okugwa #2
- </a>
- </div> nga bwe kiri
- <div id = "okugwaBbiri" class = "okugwa-omubiri-akakoodi" >
- <div class = "akakoodi-omunda" >
- Anim pariatur ekintu ekitali kya bulijjo...
- </div> nga bwe kiri
- </div> nga bwe kiri
- </div> nga bwe kiri
- </div> nga bwe kiri
- ...
Osobola n’okukozesa plugin nga tolina kabonero ka accordion. Kola button toggle okugaziya n'okugwa kwa elementi endala.
- < ekika kya button = "button" ekibiina = "btn btn-akabi" data-toggle = "okugwa" data-ekigendererwa = "#demo" >
- simple eyinza okugwa
- </button>
- <div id = "demo" class = "okugwa mu" > ... </div>
Just add data-toggle="collapse"
ne a data-target
ku element okugaba automatically control ya element eyinza okugwa. Ekintu data-target
kikkiriza css selector okukozesa okugwa. Kakasa nti ogattako kiraasi collapse
ku elementi eyinza okugwa. Bw'oba oyagala kiggule nga kisookerwako, yongera ku kiraasi ey'okugattako in
.
Okwongera okuddukanya ekibiina ekiringa accordion ku control eyinza okugwa, yongera ku data attribute data-parent="#selector"
. Laba demo olabe kino mu bikolwa.
Ssobozesa mu ngalo ne:
- $ ( ".okugwa" ). okugwa () .
Ebyokulonda bisobola okuyisibwa nga biyita mu data attributes oba JavaScript. Ku bikwata ku data, ssaako erinnya ly'okulonda ku data-
, nga mu data-parent=""
.
Erinnya | okuwandiika | okukosamu | okunnyonnyola |
---|---|---|---|
omuzadde | omusunsuzi | -kyaamu | Singa selector awo ebintu byonna ebiyinza okugwa wansi w'omuzadde alagiddwa bijja kuggalwawo nga ekintu kino ekiyinza okugwa kiragiddwa. (okufaananako n’enneeyisa ya accordion ey’ekinnansi) |
okukyusakyusa | boolean | kituufu | Ekyusa ekintu ekiyinza okugwa ku kuyita |
Ekola ebirimu byo nga ekintu ekiyinza okugwa. Akkiriza eby'okulonda eby'okwesalirawo object
.
- $ ( '#kiyinza okugwa' ). okugwa ({
- toggle : eky'obulimba
- }) .
Ekyusa ekintu ekiyinza okugwa okukiragibwa oba okukwekebwa.
Alaga ekintu ekiyinza okugwa.
Ekweka ekintu ekiyinza okugwa.
Bootstrap's collapse class eraga ebitonotono ebibaawo olw'oku hooking mu collapse functionality.
Omukolo | Okunnyonnyola |
---|---|
okulaga | Ekintu kino kikuba amangu ddala nga show enkola ya instance eyitiddwa. |
eragiddwa | Ekintu kino kikubwa nga ekintu ekigwa kikoleddwa okulabika eri omukozesa (kijja kulinda enkyukakyuka za css okuggwa). |
okweekweeka | Ekintu kino kikubwa amangu ddala hide ng’enkola eyitiddwa. |
okukweekebwa | Ekintu kino kikubwa nga ekintu ekigwa kikwekeddwa okuva eri omukozesa (kijja kulinda enkyukakyuka za css okuggwa). |
- $ ( '#kiyinza okugwa' ). ku ( 'ekikwekeddwa' , omulimu () {
- // kola ekintu...
- }) .
Slayidshow wansi eraga generic plugin ne component for cycling okuyita mu elements nga carousel.
- <div id = "Karousel yange" class = "slayidi ya carousel" >
- <ol class = "ebiraga-ebiraga nti carousel" >
- <li data-target = "#myCarousel" data-slide-to = "0" ekibiina = "ekola" ></li>
- <li data-target = "#Karousel yange" data-slide-okutuuka ku = "1" ></li>
- <li data-target = "#Karousel yange" data-slide-okutuuka ku = "2" ></li>
- </ol>
- <!-- Ebintu ebikozesebwa mu carousel -->
- <div class = "omunda mu carousel" >
- <div class = "ekintu ekikola" > ... </div>
- <div ekibiina = "ekintu" > ... </div>
- <div ekibiina = "ekintu" > ... </div>
- </div> nga bwe kiri
- <!-- Ennyonyi eziyitibwa Carousel nav -->
- <a class = "ekifuga-okufuga ku kkono" href = "#Ekika kyange" data-slide = "emabega" > ‹ </a>
- <a class = "eddembe-okufuga carousel" href = "#Carousel yange" data-slide = "ekiddako" > › </a>
- </div> nga bwe kiri
Kozesa data attributes okwanguyirwa okufuga ekifo kya carousel. data-slide
ekkiriza ebigambo ebikulu prev
oba next
, ekikyusa ekifo kya slayidi okusinziira ku kifo kyayo ekiriwo kati. Ekirala, kozesa data-slide-to
okuyisa omuwendo gwa slayidi embisi ku carousel data-slide-to="2"
, ekibuuka's ekifo kya slayidi okutuuka ku muwendo ogw'enjawulo okutandika ne 0
.
Kuba carousel mu ngalo nga okozesa:
- $ ( '.ekiwujjo' ). carousel () .
Ebyokulonda bisobola okuyisibwa nga biyita mu data attributes oba JavaScriptz. Ku bikwata ku data, ssaako erinnya ly'okulonda ku data-
, nga mu data-interval=""
.
Erinnya | okuwandiika | okukosamu | okunnyonnyola |
---|---|---|---|
interval | omuwendo | 5000 | Omuwendo gw’obudde okulwawo wakati w’okuvuga ekintu mu ddigi mu ngeri ey’otoma. Bwe kiba kya bulimba, carousel tejja kutambula butereevu. |
okuyimirizamu | akaguwa | "okuwuubaala". | Ayimiriza obugaali bwa carousel ku mouseenter era addamu okuvuga obugaali bwa carousel ku mouseleave. |
Atandikawo carousel n’enkola ez’okwesalirawo object
n’atandika okuvuga obugaali ng’ayita mu bintu.
- $ ( '.ekiwujjo' ). carousel ({ ) .
- ebbanga : 2000
- }) .
Ezingulula okuyita mu bintu bya carousel okuva ku kkono okudda ku ddyo.
Ayimiriza carousel okuvuga obugaali okuyita mu bintu.
Ezingulula carousel ku fuleemu entongole (0 okusinziira, okufaananako n'ensengekera).
Enzirukanya okutuuka ku kintu ekyayita.
Ezingulula okutuuka ku kintu ekiddako.
Bootstrap's carousel class eraga ebibaddewo bibiri eby'oku hooking mu carousel functionality.
Omukolo | Okunnyonnyola |
---|---|
okuseerera | Omukolo guno gukuba amangu ddala nga...slide enkola y'ekyokulabirako eyitibwa. |
yaseeyeeya | Ekintu kino kikubwa nga carousel emalirizza enkyukakyuka yaayo eya slide. |
Plugin enkulu, eyangu okugaziwa ey'okukola amangu typeaheads ennungi n'okuyingiza ebiwandiiko bya ffoomu yonna.
- < ekika ky'okuyingiza = "ekiwandiiko" data-provide = "ekika mu maaso" >
Ojja kwagala okuteekawo autocomplete="off"
okuziyiza menu za browser ezisookerwako okulabika ku Bootstrap typeahead dropdown.
Okwongerako data attributes okuwandiisa elementi erimu typeahead functionality nga bwekiragibwa mu kyokulabirako waggulu.
Kuba typeahead mu ngalo nga okozesa:
- $ ( '.okuwandiika mu maaso' ). okuwandiika mu maaso () .
Ebyokulonda bisobola okuyisibwa nga biyita mu data attributes oba JavaScript. Ku bikwata ku data, ssaako erinnya ly'okulonda ku data-
, nga mu data-source=""
.
Erinnya | okuwandiika | okukosamu | okunnyonnyola |
---|---|---|---|
ensibuko | ensengekera, omulimu | [ ] . | Ensibuko ya data okubuuza ku. Kiyinza okuba ensengeka y'ennyiriri oba omulimu. Omulimu guyisibwa ensonga bbiri, query omuwendo mu kifo ky’okuyingiza n’okuddamu process okuyita. Omulimu guyinza okukozesebwa mu ngeri ey’okukwatagana nga guzzaayo ensibuko ya data butereevu oba mu ngeri etakwatagana nga oyita mu process nsonga emu ey’okuddamu okuyita. |
ebintu | omuwendo | 8. | Omuwendo ogusinga obunene ogw'ebintu eby'okulaga mu dropdown. |
minObuwanvu | omuwendo | 1. | Obuwanvu bw'ennukuta obutono obwetaagisa nga tonnatandika biteeso bya autocomplete |
omuzannyi w’omupiira | enkola | obutafaayo ku nnyiriri ennene | Enkola ekozesebwa okuzuula oba ekibuuzo kikwatagana n’ekintu. Akkiriza ensonga emu, item egenda okugezesa okubuuza. Funa ekibuuzo ekiriwo kati ne this.query . Ddamu boolean true singa okubuuza kuba kukwatagana. |
omusunsula | enkola | okukwatagana okutuufu, okukwata ku nnyiriri ennene, obutakwata ku nnyiriri ennene |
Enkola ekozesebwa okusunsula ebivudde mu autocomplete. Ekkiriza ensonga emu items era erina obuwanvu bw'ekyokulabirako kya typeahead. Jjukira ekibuuzo ekiriwo kati ne this.query . |
omulongoosa | enkola | azzaayo ekintu ekirondeddwa | Enkola ekozesebwa okuzzaayo ekintu ekirondeddwa. Akkiriza ensonga emu, item era erina obuwanvu bw'ekyokulabirako kya typeahead. |
ekiraga ekintu ekikulu | enkola | eraga ebikwatagana byonna ebisookerwako | Enkola ekozesebwa okulaga ebivudde mu autocomplete. Ekkiriza ensonga emu item era erina obuwanvu bw'ekyokulabirako kya typeahead. Alina okuzzaayo html. |
Etandikawo ekiyingizibwa nga kiriko typeahead.
Subnavigation ku kkono ye live demo ya affix plugin.
Okusobola okwanguyirwa okwongera ku nneeyisa y’okugatta ku elementi yonna, yongera data-spy="affix"
ku elementi gy’oyagala okuketta. Oluvannyuma kozesa offsets okunnyonnyola ddi lw’olina okukyusakyusa okusiba ekintu okutandika n’okuggyako.
- <div data-spy = "okussaako" data-offset-waggulu = "200" > ... </div>
affix
,
affix-top
, ne
affix-bottom
. Jjukira okukebera omuzadde ayinza okugwa nga affix eyingiddewo kuba eggyawo ebirimu okuva mu ntambula eya bulijjo ey'olupapula.
Kuba ku affix plugin ng'oyita mu JavaScript:
- $ ( '#navbar' ). okussaako () .
Ebyokulonda bisobola okuyisibwa nga biyita mu data attributes oba JavaScript. Ku bikwata ku data, ssaako erinnya ly'okulonda ku data-
, nga mu data-offset-top="200"
.
Erinnya | okuwandiika | okukosamu | okunnyonnyola |
---|---|---|---|
offset | ennamba | omulimu | ekintu | 10. 10 | Pixels oku offset okuva ku screen nga obala ekifo ky'omuzingo. Singa ennamba emu eweebwa, offset ejja kukozesebwa mu ndagiriro zombi eza waggulu ne kkono. Okuwuliriza obulagirizi bumu, oba offsets ez'enjawulo eziwera, just give an object offset: { x: 10 } . Kozesa omulimu nga weetaaga okuwa offset mu ngeri ey’amaanyi (eky’omugaso ku dizayini ezimu eziddamu). |