Bring Bootstrap in kɔmpɔnɛnt dɛn to layf—naw wit 12 kɔstɔm jQuery plɔgin dɛn.
Wan strimlayn, bɔt fleksibul, tek pan di tradishɔnal javaskript modal plɔgin wit ɔl di minimum rikwayd funkshɔnaliti ɛn smat difɔlt dɛn.
Ad drɔpdɔwn mɛnyu dɛn to nia ɛnitin na Bootstrap wit dis simpul plɔgin. Bootstrap gɛt ful drɔpdɔwn mɛnyu sɔpɔt pan insay di navbar, tab dɛn, ɛn pils dɛn.
Yuz scrollspy fɔ ɔtomɛtik ɔpdet di link dɛn na yu navbar fɔ sho di aktiv link we de naw bay di say we yu de skrol.
Yuz dis plɔgin fɔ mek tab ɛn pils yusful mɔ bay we yu alaw dɛn fɔ tɔgl tru tabbul pan dɛn fɔ lokal kɔntinyu.
Wan nyu tek pan di jQuery Tipsy plɔgin, Tooltips nɔ de abop pan pikchɔ dɛn—dɛn de yuz CSS3 fɔ animashɔn ɛn data-atribyut fɔ lokal taytul stɔrɔj.
Ad smɔl ɔvalayz dɛn fɔ kɔntinyu, lɛk di wan dɛn we de na di iPad, to ɛni ɛlimɛnt fɔ haus sɛkɔndari infɔmeshɔn.
* I nid fɔ de insay di Tultip dɛn
Di alɛt plɔgin na wan smɔl klas fɔ ad klos funkshɔnaliti to alɛt dɛn.
Du mɔ wit bɔtin dɛn. Kɔntrol bɔtin de tɔk ɔ mek grup dɛn fɔ bɔtin fɔ mɔ kɔmpɔnɛnt dɛn lɛk tulba dɛn.
Gɛt bays stayl ɛn fleksibul sɔpɔt fɔ kɔlapsibl kɔmpɔnɛnt dɛn lɛk akodiɔn ɛn nevigishɔn.
Krio wan merry-go-round fɔ ɛni kɔntinyu we yu want fɔ gi wan intaraktiv slayd sho fɔ kɔntinyu.
Wan besik, izi fɔ ɛkstɛnd plɔgin fɔ mek kwik kwik wan elegant tayp-hɛd wit ɛni fɔm tɛks input.
Fɔ simpul transishɔn ifɛkt dɛn, inklud bootstrap-transition.js wan tɛm fɔ slayv insay modals ɔ fade aut alɛt dɛn.
* Rikwayd fɔ animashɔn insay plɔgin dɛn
Wan strimlayn, bɔt fleksibul, tek pan di tradishɔnal javaskript modal plɔgin wit ɔl di minimum rikwayd funkshɔnaliti ɛn smat difɔlt dɛn.
Daunlod faylDi wan dɛn we de dɔŋ ya na wan statically rendered modal.
Wan fayn fayn bɔdi...
Toggle wan modal via javascript bay we yu klik di bɔtin we de dɔŋ. I go slayv dɔŋ ɛn fade insay frɔm di ɔp pat na di pej.
Lans di modal fɔ di demoKɔl di modal bay javascript:
- $ ( '#miModal' ). modal ( opshɔn dɛn ) .
Nem | kayn | balans | tɔk bɔt |
---|---|---|---|
bakdrop fɔ de | boolean we dɛn kɔl | tru | Inklud wan modal-bakdrop ɛlimɛnt. Ɔda we de fɔ du dat, spɛsifa static fɔ wan bakdrop we nɔ de lɔk di modal we yu klik. |
kibɔd fɔ di kibɔd | boolean we dɛn kɔl | tru | Klos di modal we dɛn prɛs di ɛspɛk ki |
sho | boolean we dɛn kɔl | tru | Sho di modal we dɛn initialize. |
Yu kin aktiv modal dɛn na yu pej izi wan we yu nɔ nid fɔ rayt wan layn fɔ javaskript. Jɔs sɛt data-toggle="modal"
pan wan kɔntrol ɛlimɛnt wit wan data-target="#foo"
ɔ href="#foo"
we kɔrɛkt to wan modal ɛlimɛnt id, ɛn we yu klik, i go lanch yu modal.
Dɔn bak, fɔ ad opshɔn dɛn to yu modal instans, jɔs inklud dɛn as ɔda data atribyut dɛn pan ɛni wan pan di kɔntrol ɛlimɛnt ɔ di modal mak sɛf.
- <a klas = "btn" data-tɔgl = "modal" href = "#miModal" > Lanch Mɔdal </a>
- <div klas = "modal ayd" id = "miModal" >
- <div klas = "modal-hɛda" >
- <bɔtin tayp = "bɔtin" klas = "klos" data-dismis = "modal" > × </bɔtin>
- <h3> Modal hεda </h3>
- </div> fɔ di wan dɛn we de
- <div klas = "modal-bɔdi" >
- <p> Wan fayn bɔdi... </p>
- </div> fɔ di wan dɛn we de
- <div klas = "modal-fut" >
- <a href = "#" klas = "btn" data-dismis = "modal" > Klos </a>
- <a href = "#" klas = "btn btn-praymari" > Sev chenj dɛn </a>
- </div> fɔ di wan dɛn we de
- </div> fɔ di wan dɛn we de
.fade
klas to di
.modal
ɛlimɛnt (rifer to di demo fɔ si dis in akshɔn) ɛn inklud bootstrap-transition.js.
Aktiv yu kɔntinyu as modal. Aksept wan opshɔnal opshɔn dɛn object
.
- $ ( '#miModal' ). modal ({
- kibɔd : lay lay tɔk
- }) bin de.
Manually de toggle wan modal.
- $ ( '#miModal' ). modal ( ‘tɔgl’ ) .
Manually de opin wan modal.
- $ ( '#miModal' ). modal ( ‘sho’ ) .
Manually de ayd wan modal.
- $ ( '#miModal' ). modal ( ‘ayd’ ) .
Bootstrap in modal klas de ɛksplɔz sɔm ivin dɛn fɔ huk insay modal funkshɔnaliti.
Program | Tɔk bɔt |
---|---|
sho | Dis ivent de faya wantɛm wantɛm we dɛn kɔl di show instans mɛtɔd. |
we dɛn sho | Dis ivent de faya we di modal dɔn mek visible to di yuza (go wet fɔ css transishɔn dɛn fɔ dɔn). |
ayd | Dis ivent de faya wantɛm wantɛm we hide dɛn dɔn kɔl di instans mɛtɔd. |
ayd | Dis ivent de faya we di modal dɔn dɔn fɔ ayd frɔm di yuza (go wet fɔ css transishɔn dɛn fɔ dɔn). |
- $ ( '#miModal' ). on ( 'ayd' , fɛnshɔn () {
- // du sɔntin...
- }) bin de.
Ad drɔpdɔwn mɛnyu dɛn to nia ɛnitin na Bootstrap wit dis simpul plɔgin. Bootstrap gɛt ful drɔpdɔwn mɛnyu sɔpɔt pan insay di navbar, tab dɛn, ɛn pils dɛn.
Daunlod faylKlik pan di drɔpdɔwn nav link dɛn na di navbar ɛn pils dɛn we de dɔŋ fɔ tɛst drɔpdɔwn dɛn.
Kɔl di drɔpdɔwn dɛn bay javascript:
- $ ( '.drɔpdɔwn-tɔgl' ). drɔp dɔŋ () .
Fɔ ad drɔpdɔwn funkshɔnaliti kwik kwik wan to ɛni ɛlimɛnt jɔs ad data-toggle="dropdown"
ɛn ɛni valid butstrap drɔpdɔwn go ɔtomɛtik aktiv.
data-target="#fat"
ɔ
href="#fat"
.
- <ul klas = "nav nav-pils" >
- <li klas = "aktiv" ><a href = "#" > Rigyul link </a></li>
- <li klas = "drɔpdɔwn" id = "mɛnyu1" >
- <a klas = "drɔpdɔwn-tɔgl" data-tɔgl = "drɔpdɔwn" href = "#mɛnyu1" >
- Drɔpdɔwn
- <b klas = "kɛrɛt" ></b>
- </a> fɔ di wan dɛn we de
- <ul klas = "drɔpdɔwn-mɛnyu" >
- <li><a href = "#" > Akshɔn </a></li>
- <li><a href = "#" > Wan ɔda akshɔn </a></li>
- <li><a href = "#" > Sɔntin ɔda tin ya </a></li>
- <li klas = "divayda" </li>
- <li><a href = "#" > Separet link </a></li>
- </ul> fɔ di wan dɛn we de
- </li> fɔ di wan dɛn we de
- ...
- </ul> fɔ di wan dɛn we de
Fɔ mek di URL dɛn nɔ pwɛl, yuz di data-target
atribyut instead fɔ href="#"
.
- <ul klas = "nav nav-pils" >
- <li klas = "drɔpdɔwn" >
- <a klas = "drɔpdɔwn-tɔgl" data-tɔgl = "drɔpdɔwn" data-target = "#" href = "pat/to/pej.html" >
- Drɔpdɔwn
- <b klas = "kɛrɛt" ></b>
- </a> fɔ di wan dɛn we de
- <ul klas = "drɔpdɔwn-mɛnyu" >
- ...
- </ul> fɔ di wan dɛn we de
- </li> fɔ di wan dɛn we de
- </ul> fɔ di wan dɛn we de
Wan programatik api fɔ aktivet mɛnyu fɔ wan givɛn navbar ɔ tab nevigishɔn.
Di ScrollSpy plɔgin na fɔ ɔtomɛtik ɔpdet nav target dɛn bays pan skrol pozishɔn.
Daunlod faylSkrol di eria we de dɔŋ ɛn wach di ɔpdet fɔ di nevigishɔn. Di drɔpdɔwn sab aytem dɛn go aylayt bak. Tray am!
Ad leggings keytar, brunch id art pati dolor labore. Pitchfork yr enim lo-fi bifo dem sold out qui. Tumblr fam-to-tebul baysikul rayt ɛnitin. Anim keffiyeh karles kardigan. Velit seitan mcsweeney in foto booth 3 wolf mun irure. Cosby sweta lomo jins shɔt, williamsburg hoodie minim qui yu probabli nɔ yɛri bɔt dɛn et kadigan trɔst fund culpa biodiesel wes anderson aesthetic. Nihil tatu accusamus, cred irony bayodizel keffiyeh artisan ullamco konsekvat.
Veniam marfa moustache sketbod, adipisicing fugiat velit pitchfork biad. Frigan biad aliqua cupidatat mcsweeney in vero. Cupidatat fo loko nisi, ea helvetika nula karles. Tattoo cosby sweta fud trak, mcsweeney in quis non frigan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetik eksasaiz quis gentrify. Bruklin adipisicing kraft bia vays keytar deserunt.
Occaecat komodo alikwa delektɔs. Fap kraft bia deserunt skateboard ea. Lomo baysikul rayt adipisicing banh mi, velit ea sunt nɛks lɛvɛl locavore singl-ɔrijin kɔfi in magna veniam. Haj layf id vinyl, eko pak konsekwat quis aliquip banh mi pitchfork. Vero VHS est adipisicing fɔ di wan dɛn we de yuz am. Konsectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus konsectetur fanny pak ifon.
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 mesenja bag marfa wetin delektus fud trak. Sapiente sint id asumenda. Locavore sed helvetica cliche irony, thundercats yu probabli noh don yehri boht dem consequat hoodie gluten-fri lo-fi fap aliquip. Labore elit placeat bifo dɛn sɛl aut, terry richardson proident brunch nesciunt quis cosby sweta pariatur keffiyeh ut helvetica artisan. Cardigan kraft bia seitan redimade velit. VHS chambray laboris t ɛ m ɔ r v ɛ n ɛ m. Anim mollit minim komodo ullamco na di tendakat.
Kɔl di skrol dɛn bay javascript:
- $ ( '#navbar' na di wan dɛn we de yuz am ). skrol dɛn () .
Fɔ ad skrolspi bihayvya izi wan to yu tɔpba nevigishɔn, jɔs ad data-spy="scroll"
to di ɛlimɛnt we yu want fɔ spay pan (mɔs tipikli dis go bi di bɔdi).
- <bɔdi data-spy = "skrol" > ... </bɔdi>
<a href="#home">home</a>
fɔ kɔrɛkt to sɔntin we de na di dom lɛk
<div id="home"></div>
.
We yu de yuz scrollspy in kɔnjɔkt wit ad ɔ pul ɛlimɛnt dɛn frɔm di DOM, yu go nid fɔ kɔl di rifresh we lɛk so:
- $ ( '[data-spy="skrol"]' ). ɛni wan ( fɛnshɔn () { .
- var $spy = $ ( dis ). skrolspy ( ‘rifresh’ ) .
- });
Nem | kayn | balans | tɔk bɔt |
---|---|---|---|
ɔfset | nɔmba | 10. Di wan dɛn we de | Piksɛl dɛn fɔ ɔfset frɔm ɔp we yu de kɔl di pozishɔn fɔ skrol. |
Program | Tɔk bɔt |
---|---|
aktivet fɔ wok | Dis ivent de faya ɛnitɛm we di skrol spy mek nyu tin wok. |
Dis plɔgin de ad kwik, dinamik tab ɛn pil funkshɔnaliti fɔ chenj tru lokal kɔntinyu.
Daunlod faylKlik di tab dɛn we de dɔŋ fɔ chenj bitwin di say dɛn we dɛn ayd, ivin bay di meny dɛn we de dɔŋ.
Raw denim yu probabli noh yehri boht dem jean shorts Austin. Nesciunt tofu stumptown aliqua, retro sint masta klin. Mustache kliche tempor, wiliamsbɔg karls vegan ɛlvɛtika. Reprehenderit butcher retro keffiyeh drim kat sint. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip plesat salvia cillum iphone. Seitan aliquip quis kardigan american klos, butcher 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 letapres, keytar raw denim keffiyeh etsy art pati bifo dɛn sɛl aut masta klin gluten-fri squid scenester frigan cosby sweta. Fanny pack portland seitan DIY, art pati locavore wulf kliche ay layf eko park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi bifo dɛn sɛl ɔut fam-to-tebul VHS vayral locavore cosby sweta. Lomo wolf viral, mustache redimade tandakat keffiyeh kraft bia marfa etik. Wolf salvia frigan, sartorial keffiyeh echo park vegan.
Enable tabable tabs via javascript (ɛni tab nid fɔ aktiv wan wan):
- $ ( '#miTab a' ). klik ( fonkshɔn ( e ) { .
- e . prɛventDifɔlt ();
- $ ( dis ). tab ( ‘sho’ );
- }) bin de.
Yu kin aktiv wan wan tab dɛn difrɛn we dɛn:
- $ ( '#miTab wan[href="#profayl"]' ). tab ( ‘sho’ ); // Selekt tab bay nem
- $ ( '#miTab a:fɔs' ). tab ( ‘sho’ ); // Selekt fɔs tab
- $ ( '#miTab a: las' ). tab ( ‘sho’ ); // Selekt las tab
- $ ( '# miTab li: eq (2) a' ). tab ( ‘sho’ ); // Selekt tɔd tab (0-indeks)
Yu kin aktiv wan tab ɔ pil nevigishɔn we yu nɔ rayt ɛni javaskript bay we yu jɔs spɛsifa data-toggle="tab"
ɔ data-toggle="pill"
pan wan ɛlimɛnt. We yu ad di nav
ɛn nav-tabs
klas dɛn to di tab ul
, i go yuz di bootstrap tab stayl.
- <ul klas = "nav nav-tab dɛn" >
- <li><a href = "#os" data-tɔgl = "tab" > Os </a></li>
- <li><a href = "#prɔfayl" data-tɔgl = "tab" > Profayl </a></li>
- <li><a href = "#mɛsej dɛn" data-tɔgl = "tab" > Mɛsej dɛn </a></li>
- <li><a href = "#sɛtin" data-tɔgl = "tab" > Sɛtin dɛn </a></li>
- </ul> fɔ di wan dɛn we de
Aktiv wan tab ɛlimɛnt ɛn kɔntinyu kɔntena. Tab fɔ gɛt ɛni wan pan wan data-target
ɔ wan href
we de tɔch wan kɔntena node na di DOM.
- <ul klas = "nav nav-tab" id = "miTab" >
- <li klas = "aktiv" ><a href = "#os" > Os </a></li>
- <li><a href = "#prɔfayl" > Profayl </a></li>
- <li><a href = "#mɛsej dɛn" > Mɛsej dɛn </a></li>
- <li><a href = "#sɛtin dɛn" > Sɛtin dɛn </a></li>
- </ul> fɔ di wan dɛn we de
- <div klas = "tab-kɔntinɛnt" >
- <div klas = "tab-pan aktiv" id = "os" > ... </div>
- <div klas = "tab-pan" id = "prɔfayl" > ... </div>
- <div klas = "tab-pan" id = "mɛsej dɛn" > ... </div>
- <div klas = "tab-pan" id = "sɛtin dɛn" > ... </div>
- </div> fɔ di wan dɛn we de
- <skript>
- $ ( fɛnshɔn () { .
- $ ( '#miTab a: las' ). tab ( ‘sho’ );
- }) bin de.
- </skript>
Program | Tɔk bɔt |
---|---|
sho | Dis ivent de faya pan tab sho, bɔt bifo dɛn dɔn sho di nyu tab. Yuz event.target ɛn event.relatedTarget fɔ tɔch di aktiv tab ɛn di aktiv tab we bin de bifo (if i de) rispɛktful wan. |
we dɛn sho | Dis ivent de faya pan tab sho afta dɛn dɔn sho wan tab. Yuz event.target ɛn event.relatedTarget fɔ tɔch di aktiv tab ɛn di aktiv tab we bin de bifo (if i de) rispɛktful wan. |
- $ ( 'a[data-tɔgl="tab"]' ). on ( 'sho' , funkshɔn ( e ) {
- e . target // tab we dɛn dɔn aktiv
- e . relatedTarget // tab we bin de bifo
- }) bin de.
Inspɛkt bay di fayn fayn jQuery.tipsy plɔgin we Jason Frame rayt; Tultip dɛn na ɔpdet vɛshɔn, we nɔ de abop pan pikchɔ dɛn, dɛn de yuz css3 fɔ animashɔn dɛn, ɛn data-atribyut dɛn fɔ lokal taytul stɔrɔj.
Daunlod faylHova oba di link dɛn we de dɔŋ fɔ si tultip dɛn:
Tayt pant neks levul keffiyeh yu probabli no don yehri boht dem. Foto booth biad raw denim letterpress vegan messenger bag stumptown. Fam-to-tebul seitan, mcsweeney in fixie sataynabul quinoa 8-bit american apɛl gɛt wan tɛri richardson vaynil chambray. Beard stumptown, kardigan banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, fo loko mcsweeney in klin vegan chambray. A rili ironic artisan wetin keytar , scenester fam-to-tebul banksy Austin twita handle frigan cred raw denim singl-orijin kɔfi vayral.
Trig di tultip via javascript:
- $ ( '#ɛgzampul' ). tultip ( opshɔn dɛn ) .
Nem | kayn | balans | tɔk bɔt |
---|---|---|---|
animashɔn fɔ di pikchɔ dɛn | boolean we dɛn kɔl | tru | aplay wan css fade transishɔn to di tultip |
ples fɔ put am | string|fɔnshɔn | 'ɔp' | aw fɔ posishun di tultip - ɔp | dɔŋ ya | lɛft | rayt |
sɛlɛktɔ | rop | lay | If dɛn gi wan sɛlɛktɔ, dɛn go gi tultip ɔbjɛkt dɛn to di target dɛn we dɛn dɔn spɛsifa. |
taytul | string fɔ di wan dɛn we de | wok | '' . | difɔlt taytul valyu if `taytul` tag nɔ de |
stat | rop | 'hova' we yu de du. | aw di tultip de trig - hover | fɔs fɔs | buk |
westɛm | nɔmba | tin | 0. Di wan dɛn we de | dilay fɔ sho ɛn ayd di tultip (ms) - nɔ de aplay to manual trig tayp If dɛn gi wan nɔmba, dɛn kin delay fɔ ɔl tu di ayd/sho Objekt strɔkchɔ na: |
Fɔ pefɔmɛns rizin, di Tooltip ɛn Popover data-apis de opt in. If yu want fɔ yuz dɛn jɔs spɛsifa wan sɛlɛktɔ opshɔn.
- <a href = "#" rel = "tultip" title = "fɔs tultip" > hova oba mi </a>
Ataya wan tultip handla to wan ɛlimɛnt kɔlɛkshɔn.
Rivɛl wan ɛlimɛnt in tultip.
- $ ( '#ɛlimɛnt' ). tultip ( ‘sho’ ) .
Ayd wan ɛlimɛnt in tultip.
- $ ( '#ɛlimɛnt' ). tultip ( ‘ayd’ ) .
Toggles wan element in tultip.
- $ ( '#ɛlimɛnt' ). tultip ( ‘tɔgl’ ) .
Ad smɔl ɔvalayz dɛn fɔ kɔntinyu, lɛk di wan dɛn we de na di iPad, to ɛni ɛlimɛnt fɔ haus sɛkɔndari infɔmeshɔn.
* I nid fɔ de insay di Tultip
Daunlod faylHover ova di bɔtin fɔ trig di popover.
Enable popovers via javaskript:
- $ ( '#ɛgzampul' ). popover ( opshɔn dɛn ) .
Nem | kayn | balans | tɔk bɔt |
---|---|---|---|
animashɔn fɔ di pikchɔ dɛn | boolean we dɛn kɔl | tru | aplay wan css fade transishɔn to di tultip |
ples fɔ put am | string|fɔnshɔn | 'rayt' | aw fɔ posishun di popover - top | dɔŋ ya | lɛft | rayt |
sɛlɛktɔ | rop | lay | if dɛn gi wan sɛlɛktɔ, dɛn go gi tultip ɔbjɛkt dɛn to di target dɛn we dɛn dɔn spɛsifa |
stat | rop | 'hova' we yu de du. | aw di tultip de trig - hover | fɔs fɔs | buk |
taytul | string fɔ di wan dɛn we de | wok | '' . | difɔlt taytul valyu if `taytul` atribyut nɔ de |
satisfay | string fɔ di wan dɛn we de | wok | '' . | difɔlt kɔntinyu valyu if `data-kɔntinɛnt` atribyut nɔ de |
westɛm | nɔmba | tin | 0. Di wan dɛn we de | dilay fɔ sho ɛn ayd di popover (ms) - nɔ de aplay to manual trigger type If dɛn gi wan nɔmba, dɛn kin delay fɔ ɔl tu di ayd/sho Objekt strɔkchɔ na: |
Fɔ pefɔmɛns rizin, di Tooltip ɛn Popover data-apis de opt in. If yu want fɔ yuz dɛn jɔs spɛsifa wan sɛlɛktɔ opshɔn.
Initializes popovers fɔ wan ɛlimɛnt kɔllɛkshɔn.
Rivɛl wan ɛlimɛnt dɛn popover.
- $ ( '#ɛlimɛnt' ). popover ( ‘sho’ ) .
Ayd wan ɛlimɛnt dɛn popover.
- $ ( '#ɛlimɛnt' ). popover ( ‘ayd’ ) .
Toggles wan ɛlimɛnt dɛn popover.
- $ ( '#ɛlimɛnt' ). popover ( ‘tɔgl’ ) .
Di alɛt plɔgin de wok pan rɛgyula alɛt mɛsej dɛn, ɛn blok mɛsej dɛn.
Chenj dis ɛn dat ɛn tray bak. Duis mollis, est non komodo luktus, nisi erat porttitor ligula, eget lasinia odio sem nec elit. Kras mattis konsektetur purus sidon amet fεmεnt.
Ɛnable fɔ dismis wan alɛt bay javascript:
- $ ( ".alɛt" ). alɛrt () .
Jɔs ad data-dismiss="alert"
to yu klos bɔtin fɔ gi yu wan alɛt klos funkshɔnaliti ɔtomɛtik wan.
- <a klas = "klos" data-dismiss = "alɛt" href = "#" > &tayms; </a> fɔ di wan dɛn we de
Rap ɔl di alɛt dɛn wit klos funkshɔnaliti. Fɔ mek yu alɛt dɛn animate aut we dɛn lɔk, mek shɔ se dɛn gɛt di .fade
ɛn .in
klas we dɔn ɔlrɛdi aplay to dɛn.
Klos wan alɛt.
- $ ( ".alɛt" ). alert ( ‘klos’ ) .
Bootstrap in alɛt klas de ɛksplɔz sɔm ivintɛns fɔ huk insay alert funkshɔnaliti.
Program | Tɔk bɔt |
---|---|
tayt | Dis ivent de faya wantɛm wantɛm we dɛn kɔl di close instans mɛtɔd. |
dɛn dɔn lɔk am | Dis ivent de faya we di alert dɔn klos (go wet fɔ css transishɔn dɛn fɔ dɔn). |
- $ ( '#mi-alɛt' ). bind ( 'klos' , fɛnshɔn () {
- // du sɔntin...
- }) bin de.
Gɛt bays stayl ɛn fleksibul sɔpɔt fɔ kɔlapsibl kɔmpɔnɛnt dɛn lɛk akodiɔn ɛn nevigishɔn.
Daunlod fayl* I nid fɔ de insay di Transitions plɔgin.
Yuz di kollaps plɔgin, wi bil wan simpul akkɔdin stayl widget:
Ɛnable via javascript:
- $ ( ".kɔlaps" ). fɔdɔm () .
Nem | kayn | balans | tɔk bɔt |
---|---|---|---|
mama ɔ papa | sɛlɛktɔ | lay | If sɛlɛktɔ den ɔl di ɛlimɛnt dɛn we dɛn kin kɔl ɔnda di mama ɛn papa we dɛn dɔn spɛsifa go lɔk we dɛn sho dis tin we dɛn kin kol. (we fiba di tradishɔnal akɔdin we dɛn kin biev) |
fɔ chenj di we aw dɛn de | boolean we dɛn kɔl | tru | Toggles di kollapsibl elemɛnt pan invokeshɔn |
Jɔs ad data-toggle="collapse"
ɛn wan data-target
to ɛlimɛnt fɔ ɔtomɛtik asaynd kɔntrol fɔ wan kollapsbul ɛlimɛnt. Di data-target
atribyut aksept wan css sɛlɛktɔ fɔ aplay di kɔlaps to. Mek shɔ se yu ad di klas collapse
to di ɛlimɛnt we yu kin kɔlap. If yu want fɔ mek i opin difɔlt, ad di ɔda klas in
.
- <bɔt klas = "btn btn-denja" data-tɔgl = "kɔlaps" data-target = "#demo" >
- simpul we pɔsin kin kɔlap
- </bɔtin>
- <div id = "demo" klas = "kɔlaps insay" > ... </div>
data-parent="#selector"
. Rif to di demo fɔ si dis in akshɔn.
Aktiv yu kɔntinyu as wan ɛlimɛnt we pɔsin kin kɔlap. Aksept wan opshɔnal opshɔn dɛn object
.
- $ ( '#mi Kɔlapsibl' ). kollaps ({
- toggle : na lay lay tɔk
- }) bin de.
Toggles wan kollapsibl elemɛnt fɔ sho ɔ ayd.
Sho wan ɛlimɛnt we pɔsin kin kɔlap.
I de ayd wan ɛlimɛnt we pɔsin kin kɔlap.
Bootstrap in kollaps klas de ɛksplɔz sɔm ivintɛns fɔ huk insay kollaps funkshɔnaliti.
Program | Tɔk bɔt |
---|---|
sho | Dis ivent de faya wantɛm wantɛm we dɛn kɔl di show instans mɛtɔd. |
we dɛn sho | Dis ivent de faya we wan kollaps elemɛnt dɔn mek visible to di yuza (go wet fɔ css transishɔn dɛn fɔ dɔn). |
ayd | Dis ivent de faya wantɛm wantɛm we hide dɛn dɔn kɔl di we aw dɛn de du am. |
ayd | Dis ivent de faya we wan kollaps elemɛnt dɔn ayd frɔm di yuza (go wet fɔ css transishɔn dɛn fɔ dɔn). |
- $ ( '#mi Kɔlapsibl' ). on ( 'ayd' , fɛnshɔn () {
- // du sɔntin...
- }) bin de.
Wach di slayd sho we de dɔŋ ya.
Kɔl bay javascript:
- $ ( '.karɔsel' ). karusel () ɛn .
Nem | kayn | balans | tɔk bɔt |
---|---|---|---|
intaval | nɔmba | 5000 pipul dɛn | Di amount of taim fɔ delay bitwin ɔtomɛtik sayklis wan tin. If na lay, karusel nɔ go ɔtomɛtik saykl. |
wet smɔl | rop | "hova" fɔ de. | Pauz di sayklis fɔ di karusel pan mawsɛnt ɛn bigin bak di sayklis fɔ di karusel pan mawslif. |
Data atribyut dɛn de yuz fɔ di fɔs ɛn nɛks kɔnrol dɛn. Chek di ɛgzampul mak we de dɔŋ ya.
- <div id = "miKarosel" klas = "karusel slayd" >
- <!-- Karusel tin dɛn -->
- <div klas = "karusel-ina" >
- <div klas = "aktiv aytem" > ... </div>
- <div klas = "aytem" > ... </div>
- <div klas = "aytem" > ... </div>
- </div> fɔ di wan dɛn we de
- <!-- Karusel nav -->
- <a klas = "karusel-kɔntrol lɛf" href = "#miKarosel" data-slayd = "prev" > ‹ </a> fɔ di wan dɛn we de
- <a klas = "karusel-kɔntrol rayt" href = "#miKarosel" data-slayd = "nɛks" > › </a> fɔ di wan dɛn we de
- </div> fɔ di wan dɛn we de
Initializes di carousel wit wan opshonal opshon object
en stat saikl tru tin dem.
- $ ( '.karɔsel' ). karɔsel ({
- intaval : 2000 na di ia
- }) bin de.
Saykl dɛn tru di karusel tin dɛn frɔm lɛft to rayt.
Stɔp di karusel fɔ sayklɔs tru tin dɛn.
Saykl di karusel to wan patikyula freym (0 bays, we fiba wan arenjmɛnt).
Saykl dɛn to di tin we bin dɔn de bifo.
Saykl dɛn to di nɛks tin.
Bootstrap in karusel klas de ɛksplɔz tu ivintɛns fɔ huk insay karusel funkshɔnaliti.
Program | Tɔk bɔt |
---|---|
sink | Dis ivent de faya wantɛm wantɛm we dɛn kɔl di slide instans mɛtɔd. |
bin slid | Dis ivent de faya we di karusel dɔn dɔn in slayd transishɔn. |
Wan besik, izi fɔ ɛkstɛnd plɔgin fɔ mek kwik kwik wan elegant tayp-hɛd wit ɛni fɔm tɛks input.
Daunlod faylStart fɔ tayp na di fil we de dɔŋ fɔ sho di rizɔlt dɛn we de bifo di tayp.
Kɔl di typeahead bay javascript:
- $ ( '.tayp bifo' ). tayp bifo () .
Nem | kayn | balans | tɔk bɔt |
---|---|---|---|
usay i kɔmɔt | arenjmɛnt fɔ di wan dɛn we de | [ ] . | Di data sɔs fɔ aks agens. |
tin dɛn | nɔmba | 8. Di wan dɛn we de | Di maks nɔmba fɔ di tin dɛn we yu fɔ sho na di drɔpdɔwn. |
di wan we de mach | wok | kes we nɔ gɛt sɛns | Di we aw dɛn kin yuz fɔ no if kwɛstyɔn de mach wan tin. Aksept wan argumɛnt, di item agens we fɔ tɛst di kwɛstyɔn. Akses di kwɛstyɔn we yu de aks naw wit this.query . Ritɔn wan bɔlin true if kwɛstyɔn na wan mach. |
sɔrt we de sɔt | wok | ɛksaktɔl mach, kes sɛnsitiv, kes nɔ sɛnsitiv |
Method we dɛn yuz fɔ sɔt ɔtokɔmplit rizɔlt dɛn. Aksept wan singl argumɛnt items ɛn gɛt di skɔp fɔ di typeahead instans. Rifrɛns di kwɛstyɔn we yu de aks naw wit this.query . |
di wan we de sho aw fɔ aylayt | wok | de sho ɔl di difɔlt mats dɛn | Method we dɛn yuz fɔ sho di ɔtokɔmplit rizɔlt dɛn. Aksept wan singl argumɛnt item ɛn gɛt di skɔp fɔ di typeahead instans. Fɔ ritɔn html. |
Ad data atribyut fɔ rɛjista wan ɛlimɛnt wit typeahead funkshɔnaliti.
- <input tayp = "tɛks" data-provayd = "tayp bifo" >
Initialize wan input wit wan typeahead.