Fa'aola vaega a Bootstrap—lea ua iai nei fa'apipi'i masani e 12 jQuery .
Ose fa'amanino, ae fetu'una'i, fa'aaoga le javascript modal plugin fa'atasi ma na'o le fa'aitiitiga mana'omia ma fa'aletonu atamai.
Faʻaopoopo i lalo menus i le toetoe lava o soʻo se mea i Bootstrap ma lenei faʻapipiʻi faigofie. O le Bootstrap o loʻo faʻaalia ai le lagolago atoa o le lisi i lalo i luga o le navbar, tabs, ma fualaau.
Fa'aaoga le scrollspy e otometi ona fa'afou so'otaga i lau navbar e fa'aalia ai le so'otaga galue o lo'o iai nei e fa'atatau i le tulaga ta'ai.
Fa'aoga lenei fa'apipi'i e fa'aoga atili ai laupepa ma pills e ala i le fa'ataga latou e fealua'i i fa'amau fa'amau o mea fa'apitonu'u.
O se manatu fou i luga o le jQuery Tipsy plugin, Tooltips e le fa'alagolago i ata-latou te fa'aogaina le CSS3 mo fa'afiafiaga ma fa'amaumauga-uiga mo le teuina o suafa fa'apitonu'u.
Fa'aopoopo ni fa'aputuga laiti o mea, pei o i luga ole iPad, i so'o se elemene mo fa'amatalaga lona lua o fale.
* Manaomia meafaigaluega e faʻapipiʻi
O le fa'apipi'i mataala o se vasega la'ititi mo le fa'aopoopoina o galuega fa'atino i fa'aaliga.
Fai atili i fa'amau. Fa'amalo fa'aigoa po'o le fa'atupuina o vaega o fa'amau mo nisi vaega e pei o meafaigaluega.
Maua sitaili faavae ma lagolago fetuutuunai mo vaega malepelepe pei o akordion ma le folauga.
Fausia se ta'amilosaga fiafia o so'o se mea e te mana'o e tu'uina atu ai se fa'ata'ita'iga fegalegaleai o mea.
O se mea fa'apipi'i faigofie fa'alautele mo le vave faia o mataitusi mata'itusi ma so'o se fa'aoga tusitusiga.
Mo a'afiaga faigofie o suiga, fa'aaofia le bootstrap-transition.js e tasi e fa'ase'e i fa'ata'ita'iga po'o fa'aliga fa'alilolilo.
* Manaomia mo animation i plugins
Ose fa'amanino, ae fetu'una'i, fa'aaoga le javascript modal plugin fa'atasi ma na'o le fa'aitiitiga mana'omia ma fa'aletonu atamai.
La'u failaO lo'o i lalo se faiga fa'atusa fa'atusa.
E tasi le tino lelei…
Su'e se modal e ala ile javascript ile kilikiina ole ki lalo. O le a fa'ase'e ifo i lalo ma mou atu mai le pito i luga o le itulau.
Fa'alauiloa le fa'ata'ita'iga aualaValaau le modal e ala i le javascript:
- $ ( '#myModal' ). modal ( filifiliga )
Igoa | ituaiga | faaletonu | fa'amatalaga |
---|---|---|---|
tuaa | boolean | moni | E aofia ai se elemene fa'aola-backdrop. I le isi itu, fa'amaoti static mo se fa'ata'atia e le tapuni ai le auala ile kiliki. |
piano | boolean | moni | Tapuni le auala pe a oomi le ki sola |
fa'aali | boolean | moni | Fa'aalia le faiga pe'ā amata. |
E mafai ona e faʻagaoioia modals i luga o lau itulau faigofie e aunoa ma le tusiaina o se laina se tasi o javascript. Na'o le tu'u data-toggle="modal"
i luga o se elemene fa'atonutonu ma se data-target="#foo"
po'o href="#foo"
e fetaui ma se id elemene, ma pe a kiliki, o le a fa'alauiloa lau auala.
E le gata i lea, e faʻaopoopo filifiliga i lau faʻataʻitaʻiga faʻataʻitaʻiga, naʻo le faʻapipiʻiina o faʻamatalaga faʻamatalaga i luga ole elemene pulea poʻo le faʻailoga faʻailoga lava ia.
- <a class = "btn" data-toggle = "modal" href = "#myModal" > Launch Modal </a>
- <div class = "modal hide" id = "myModal" >
- <div class = "modal-header" >
- <button type = "button" class = "close" data-dismiss = "modal" > × </button>
- <h3> Ulutala fa'atatau </h3>
- </div>
- <div class = "modal-body" >
- <p> Tasi le tino lelei... </p>
- </div>
- <div class = "modal-footer" >
- <a href = "#" class = "btn" data-dismiss = "modal" > Tapuni </a>
- <a href = "#" class = "btn btn-primary" > Sefe suiga </a>
- </div>
- </div>
.fade
vasega i le
.modal
elemene (silasila i le demo e vaʻai i lenei gaioiga) ma aofia ai bootstrap-transition.js.
Fa'agaoioia lau anotusi e fai ma fa'ata'ita'iga. Talia se filifiliga faitalia object
.
- $ ( '#myModal' ). auala ({
- piano : sese
- })
Su'e ma le lima se faiga.
- $ ( '#myModal' ). modal ( 'toggle' )
Tatala ma le lima se auala.
- $ ( '#myModal' ). modal ( 'fa'aali' )
Natia ma le lima se auala.
- $ ( '#myModal' ). modal ( 'natia' )
O le vasega fa'apitoa a Bootstrap o lo'o fa'aalia ai ni nai mea na tutupu mo le fa'aogaina o galuega fa'atino.
Mea na tupu | Fa'amatalaga |
---|---|
fa'aali | E mu vave lenei mea pe a show valaʻau le auala faʻataʻitaʻiga. |
faaalia | O lenei mea na tupu e faʻamalo pe a faʻaalia le modal i le tagata faʻaoga (o le a faʻatali mo suiga css e maeʻa). |
lalafi | O lenei mea na tupu e faʻamalo vave pe a hide valaʻau le auala faʻataʻitaʻiga. |
natia | O lenei mea e tupu pe a maeʻa ona natia le modal mai le tagata faʻaoga (o le a faʻatali mo suiga css e maeʻa). |
- $ ( '#myModal' ). i luga ( 'natia' , galuega () {
- // fai se mea...
- })
Faʻaopoopo i lalo menus i le toetoe lava o soʻo se mea i Bootstrap ma lenei faʻapipiʻi faigofie. O le Bootstrap o loʻo faʻaalia ai le lagolago atoa o le lisi i lalo i luga o le navbar, tabs, ma fualaau.
La'u failaKiliki i luga o feso'ota'iga nav i lalo i le navbar ma pills o lo'o i lalo e su'e ai fa'alalo.
Valaau le pa'u i lalo e ala i le javascript:
- $ ( '.dropdown-toggle' ). pa'u i lalo ()
Ina ia vave fa'aopoopo galuega fa'alalo i so'o se elemene na'o le fa'aopoopo data-toggle="dropdown"
ma so'o se fa'amaufa'ailoga bootstrap aoga o le a otometi lava ona fa'agaoioia.
data-target="#fat"
po'o le
href="#fat"
.
- <ul class = "nav nav-pills" >
- <li class = "active" ><a href = "#" > So'oga masani </a></li>
- <li vasega = "pa'u i lalo" id = "menu1" >
- <a vasega = "pa'u-toggle" data-toggle = "pa'u i lalo" href = "#menu1" >
- Pa'u i lalo
- <b class = "caret" ></b>
- </a>
- <ul class = "fa'alalo-menu" >
- <li><a href = "#" > Fa'atino </a></li>
- <li><a href = "#" > O se isi gaioiga </a></li>
- <li><a href = "#" > O se isi mea iinei </a></li>
- <li vasega = "vaelua" ></li>
- <li><a href = "#" > So'oga vavae </a></li>
- </ul>
- </li>
- ...
- </ul>
Ina ia fa'atumauina URL, fa'aoga le data-target
uiga nai lo le href="#"
.
- <ul class = "nav nav-pills" >
- <li vasega = "pa'u i lalo" >
- <a class = "pa'u-toggle" data-toggle = "pa'u i lalo" data-target = "#" href = "path/to/page.html" >
- Pa'u i lalo
- <b class = "caret" ></b>
- </a>
- <ul class = "fa'alalo-menu" >
- ...
- </ul>
- </li>
- </ul>
O se polokalame fa'apolokalame mo le fa'agaoioia o menus mo se fa'ailoga tu'ufa'atasi po'o le fa'ailoga fa'apipi'i.
O le ScrollSpy plugin e mo le fa'afouina otometi fa'atatau o le nav e fa'atatau i le tulaga ta'ai.
La'u failaFa'asolo le vaega o lo'o i lalo ma matamata i le fa'afouga o fa'atautaiga. O le a fa'amaninoina fo'i le fa'ailoga pito i lalo. Taumafai!
Ad leggings keytar, brunch id art party dolor laboure. Pitchfork yr enim lo-fi ae le'i fa'atau atu. Tumblr farm-to-table uila aia tatau po o le a lava. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui masalo e te le'i faalogo iai ma cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
Veniam marfa mustache laupapa, adipisicing fugiat velit pitchfork 'ava. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat fa loko nisi, ea helvetica nulla carles. Ta'u mea'ai ta'avale cosby pe'a, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.
Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo uila aia tatau adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. O le Vero VHS o le faʻaleleia. Consectetur nisi DIY minim avefe'au ato. Cred ex in, sustainable delectus consectetur fanny pack iphone.
In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.
Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
Keytar twee blog, culpa avefe'au ato marfa so'o se loli meaai. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats masalo e te le'i faalogo ia i latou consequat hoodie gluten-free lo-fi fap aliquip. Laboure elit placeat ae le'i fa'atau atu, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
Valaau le scrollspy e ala i le javascript:
- $ ( '#navbar' ). scrollspy ()
Ina ia faʻafaigofie ona faʻapipiʻi le amio taʻavale i lau faʻasalalauga pito i luga, naʻo le faʻaopopo data-spy="scroll"
i le elemene e te manaʻo e sipai ai (sili ona masani o le tino lea).
- <body data-spy = "scroll" > ... </body>
<a href="#home">home</a>
tatau ona fetaui ma se mea i totonu o le fale e pei o
<div id="home"></div>
.
A faʻaaoga le scrollspy faʻatasi ma le faʻaopoopoina poʻo le aveesea o elemene mai le DOM, e tatau ona e valaʻau le auala faʻafouina e pei o lea:
- $ ( '[data-spy="scroll"]' ). taitasi ( galuega ( ) {
- var $spy = $ ( lenei ). scrollspy ( 'refresh' )
- });
Igoa | ituaiga | faaletonu | fa'amatalaga |
---|---|---|---|
fa'apena | numera | 10 | Pixels e fa'asolo mai luga pe a fa'atatau le tulaga o le ta'ai. |
Mea na tupu | Fa'amatalaga |
---|---|
fa'agaoioi | E mu lenei mea i so'o se taimi e fa'agaoioi ai se mea fou e le scrollspy. |
O lenei mea fa'apipi'i fa'aopoopoina vave, fa'agaioiga fa'agaioiga ma piliki mo le fa'aliliuina i totonu o mea fa'apitonu'u.
La'u failaKiliki fa'amau o lo'o i lalo e fa'asolo i le va o fa'ailo natia, e o'o lava ile fa'aulu i lalo menus.
Raw denim masalo e te le'i fa'alogo i ai Jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Faʻafeiloaʻi i le salvia cillum iphone. Seitan aliquip quis cardigan ofu Amerika, 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 letterpress, keytar raw denim keffiyeh etsy art party ae le'i fa'atau atu master cleanse 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 ae latou te le'i fa'atau atu fa'ato'aga-i-table VHS viral locavore cosby sweater. Lomo luko viral, misa readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.
Fa'aaga tabbable tabs e ala i le javascript (e mana'omia ona fa'agaoioia ta'itasi ta'itasi):
- $ ( '#myTab a' ). kiliki ( galuega ( e ) {
- e . preventDefault ();
- $ ( lenei ). tab ( 'fa'aali' );
- })
E mafai ona e fa'agaoioia ta'iala ta'itasi i le tele o auala:
- $ ( '#myTab a[href="#profile"]' ). tab ( 'fa'aali' ); // Filifili le lisi ile igoa
- $ ( '#myTab a:muamua' ). tab ( 'fa'aali' ); // Filifili le laupepa muamua
- $ ( '#myTab a:muli' ). tab ( 'fa'aali' ); // Filifili le laupepa mulimuli
- $ ( '#myTab li:eq(2) a' ). tab ( 'fa'aali' ); // Filifili le laupepa lona tolu (0-indexed)
E mafai ona e fa'agaoioia se fa'ailoga po'o se pill navigation e aunoa ma le tusiaina o so'o se javascript i le na'o le fa'amaonia data-toggle="tab"
po'o data-toggle="pill"
luga o se elemene. O le fa'aopoopoina o le nav
ma nav-tabs
vasega i le fa'ailoga o le ul
a fa'aogaina ai le fa'ailoga o le bootstrap tab.
- <ul class = "nav nav-tabs" >
- <li><a href = "#home" data-toggle = "tab" > Fale </a></li>
- <li><a href = "#profile" data-toggle = "tab" > Tala'aga </a></li>
- <li><a href = "#messages" data-toggle = "tab" > Messages </a></li>
- <li><a href = "#settings" data-toggle = "tab" > Seti </a></li>
- </ul>
Fa'aagaoioia se fa'ailoga elemene ma mea o lo'o i totonu. O le Tab e tatau ona i ai se data-target
poʻo se href
faʻatatau i se pusa pusa i le DOM.
- <ul class = "nav nav-tabs" id = "myTab" >
- <li class = "active" ><a href = "#home" > Home </a></li>
- <li><a href = "#profile" > Tala'aga </a></li>
- <li><a href = "#messages" > Savali </a></li>
- <li><a href = "#settings" > Fa'atonu </a></li>
- </ul>
- <div class = "tab-content" >
- <div class = "tab-pane active" id = "home" > ... </div>
- <div class = "tab-pane" id = "profile" > ... </div>
- <div class = "tab-pane" id = "messages" > ... </div>
- <div class = "tab-pane" id = "settings" > ... </div>
- </div>
- <script>
- $ ( galuega () {
- $ ( '#myTab a:muli' ). tab ( 'fa'aali' );
- })
- </script>
Mea na tupu | Fa'amatalaga |
---|---|
fa'aali | O lenei mea na tupu e mu i luga o faʻaaliga faʻaaliga, ae leʻi faʻaalia le faʻailoga fou. Fa'aoga event.target ma event.relatedTarget fa'atatau i le ta'i ga'oi ma le fa'agaioiga muamua (pe a maua) ta'itasi. |
faaalia | O lenei mea e tupu e mu i luga o le faʻaaliga faʻapipiʻi pe a uma ona faʻaalia se tab. Fa'aogaevent.target ma event.relatedTarget fa'atatau i le ta'i ga'oi ma le fa'agaioiga muamua (pe a maua) ta'itasi. |
- $ ( 'a[data-toggle="tab"]' ). on ( 'fa'aalia' , galuega ( e ) {
- u . sini // fa'agaoioia tab
- u . relatedTarget // tab muamua
- })
Musuia e le sili jQuery.tipsy plugin tusia e Jason Frame; Tooltips o se fa'afouga fou, e le fa'alagolago i ata, fa'aoga css3 mo fa'afiafiaga, ma fa'amaumauga-uiga mo le teuina o suafa fa'apitonu'u.
La'u failaFa'apa i luga o so'oga o lo'o i lalo e va'ai i mea faigaluega:
ofuvae fufusi isi tulaga keffiyeh masalo e te le'i fa'alogo iai. Fa'ato'aga ata 'ava fa'a denim mata'itusi vegan taga avefe'au stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit amerika ofu e iai le terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, fa loko mcsweeney's cleanse vegan chambray. O se tufuga fa'atauva'a lava so'o se keytar , scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.
Fa'aoso le mea faigaluega e ala ile javascript:
- $ ( '#fa'ata'ita'iga' ). mea faigaluega ( filifiliga )
Igoa | ituaiga | faaletonu | fa'amatalaga |
---|---|---|---|
animation | boolean | moni | fa'aoga se suiga e mou atu css i le mea faigaluega |
tu'uga | manoa|galuega | 'pito' | fa'afefea ona fa'atulaga le mea faigaluega - pito i luga | lalo | agavale | tauagavale |
tagata filifilia | manoa | pepelo | Afai e tu'uina atu se tagata filifilia, o mea fa'aoga meafaigaluega o le a tu'uina atu i sini fa'apitoa. |
suafa | manoa | galuega faatino | '' | fa'aigoa fa'aigoa pe afai e le o iai le pine o le 'igoa' |
fa'aoso | manoa | 'ave'ave' | pe fa'afefea ona fa'aosoina meafaigaluega - fa'afefe | taula'i | tusi lesona |
tuai | numera | mea faitino | 0 | fa'atuai ona fa'aali ma nana le mea faigaluega (ms) - e le fa'atatau ile ituaiga fa'aoso tusi Afai e tu'uina atu se numera, fa'atuai e fa'aoga i natia/fa'aali uma O le fausaga o mea faitino o le: |
Mo mafua'aga o fa'atinoga, o le Tooltip ma le Popover data-apis e tu'u i totonu. Afai e te mana'o e fa'aoga ia na'o le fa'atonuina o se filifiliga filifiliga.
- <a href = "#" rel = "tooltip" title = "first tooltip" > fa'ae'e i luga o a'u </a>
Fa'apipi'i se tu'u fa'amatalaga meafaigaluega i se aoina elemene.
Fa'aalia le mea faigaluega o se elemene.
- $ ( '#elemene' ). meafaigaluega ( 'fa'aali' )
Natia le mea faigaluega o se elemene.
- $ ( '#elemene' ). meafaigaluega ( 'natia' )
Su'e le pito meafaigaluega a se elemene.
- $ ( '#elemene' ). mea faigaluega ( ' toggle ' )
Fa'aopoopo ni fa'aputuga laiti o mea, pei o i luga ole iPad, i so'o se elemene mo fa'amatalaga lona lua o fale.
* E manaʻomia le faʻapipiʻiina o meafaigaluega
La'u failaFa'ae'e i luga o le ki e fa'aoso ai le popover.
Fa'aaga popovers e ala ile javascript:
- $ ( '#fa'ata'ita'iga' ). popover ( filifiliga )
Igoa | ituaiga | faaletonu | fa'amatalaga |
---|---|---|---|
animation | boolean | moni | fa'aoga se suiga e mou atu css i le mea faigaluega |
tu'uga | manoa|galuega | 'tauagavale' | fa'afefea ona fa'atulaga le popover - luga | lalo | agavale | tauagavale |
tagata filifilia | manoa | pepelo | afai e tu'uina atu se tagata filifilia, o meafaigāluega o le a tu'uina atu i fa'amoemoega fa'apitoa |
fa'aoso | manoa | 'ave'ave' | pe fa'afefea ona fa'aosoina meafaigaluega - fa'afefe | taula'i | tusi lesona |
suafa | manoa | galuega faatino | '' | fa'aigoa fa'aigoa pe a le o iai le uiga 'igoa' |
anotusi | manoa | galuega faatino | '' | le aoga o mea i totonu pe afai e le o iai le uiga o le 'data-content' |
tuai | numera | mea faitino | 0 | fa'atuai ona fa'aali ma nana le popover (ms) - e le fa'atatau ile fa'ailoga tusi tusi Afai e tu'uina atu se numera, fa'atuai e fa'aoga i natia/fa'aali uma O le fausaga o mea faitino o le: |
Mo mafua'aga o fa'atinoga, o le Tooltip ma le Popover data-apis e tu'u i totonu. Afai e te mana'o e fa'aoga ia na'o le fa'atonuina o se filifiliga filifiliga.
E amata popovers mo se aoina elemene.
Fa'aalia se fa'apipi'i elemene.
- $ ( '#elemene' ). popover ( 'fa'aali' )
Natia se fa'apipi'i elemene.
- $ ( '#elemene' ). popover ( 'natia' )
Fa'asolo i luga o se elemene fa'apipi'i.
- $ ( '#elemene' ). popover ( 'toggle' )
O le fa'apipi'i mataala o se vasega la'ititi mo le fa'aopoopoina o galuega fa'atino i fa'aaliga.
La'u maiO le fa'apipi'i fa'alilolilo e galue i fe'au mataala masani, ma poloka fe'au.
Suia lea mea ma lena ma toe taumafai. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.
Fa'ataga le fa'ate'aina o se mataala e ala i le javascript:
- $ ( ".alert" ). mataala ()
Na'o le fa'aopoopo data-dismiss="alert"
i lau ki tapuni e otometi ai ona tu'uina atu se fa'agaioiga vavalalata mataalia.
- <a vasega = "close" data-dismiss = "alert" href = "#" > &taimi; </a>
Ta'i fa'alilolilo uma fa'atasi ma fa'atinoga vavalalata. Ina ia fa'aoso au fa'ailo pe a tapuni, ia mautinoa o lo'o i ai le .fade
ma .in
le vasega ua uma ona fa'aoga ia i latou.
Tapuni se mataala.
- $ ( ".alert" ). mataala ( 'tapuni' )
O le vasega mataala a Bootstrap o lo'o fa'aalia ni nai mea na tutupu mo le fa'aogaina i galuega mataala.
Mea na tupu | Fa'amatalaga |
---|---|
tapunia | E mu vave lenei mea pe a close valaʻau le auala faʻataʻitaʻiga. |
tapuni | O lenei mea e tupu pe a tapunia le mataala (o le a faʻatali mo suiga css e maeʻa). |
- $ ( '#my-alert' ). fusifusia ( 'tapuni' , galuega () {
- // fai se mea...
- })
Maua sitaili faavae ma lagolago fetuutuunai mo vaega malepelepe pei o akordion ma le folauga.
La'u faila* Manaomia le faʻapipiʻi Transitions e aofia ai.
I le faʻaaogaina o le paʻu faʻapipiʻi, na matou fausia ai se widget style accordion faigofie:
Fa'aaga e ala ile javascript:
- $ ( ".collapse" ). pa'u ()
Igoa | ituaiga | faaletonu | fa'amatalaga |
---|---|---|---|
matua | tagata filifilia | pepelo | Afai o le tagata filifilia o lona uiga o elemene uma e mafai ona pa'u i lalo o le matua faʻamaonia o le a tapunia pe a faʻaalia lenei mea faʻapipiʻi. (e taitutusa ma amioga fa'ale-aganu'u) |
fesuia'i | boolean | moni | Fa'asolo le elemene e mafai ona pa'u i luga ole valaau |
Na'o le fa'aopoopo data-toggle="collapse"
ma le data-target
i le elemene e otometi ai ona tu'uina atu le fa'atonuga o se mea e mafai ona fa'apa'ia. E data-target
talia e le uiga le css filifili e fa'aoga le pa'u i. Ia mautinoa e faaopoopo le vasega collapse
i le elemene e mafai ona pa'u. Afai e te mana'o e le'i tatalaina, fa'aopoopo le vasega fa'aopoopo in
.
- <button class = "btn btn-danger" data-toggle = "pa'ū" data-target = "#demo" >
- faigofie ona malepe
- </fa'amau>
- <div id = "demo" class = "pa'ū i totonu" > … </div>
data-parent="#selector"
. Va'ai i le demo e va'ai ai i lenei gaioiga.
Fa'aagaoioia lau anotusi o se elemene e mafai ona pa'u. Talia se filifiliga faitalia object
.
- $ ( '#myCollapsible' ). pa'u ({
- toggle : sese
- })
Su'e se elemene e mafai ona pa'u e fa'aali pe natia.
Fa'aalia se elemene e mafai ona pa'u.
Natia se elemene e mafai ona pa'u.
O le vasega pa'u a Bootstrap o lo'o fa'aalia ni nai mea na tutupu mo le fa'aogaina o galuega fa'aletonu.
Mea na tupu | Fa'amatalaga |
---|---|
fa'aali | E mu vave lenei mea pe a show valaʻau le auala faʻataʻitaʻiga. |
faaalia | O lenei mea e tupu pe a faʻaalia se elemene paʻu i le tagata faʻaoga (o le a faʻatali mo suiga css e maeʻa). |
lalafi | O lenei mea na tupu e faʻamalo vave pe a hide valaʻau le metotia. |
natia | O lenei mea e tupu pe a natia se elemene pa'ū mai le tagata faʻaoga (o le a faʻatali mo suiga css e maeʻa). |
- $ ( '#myCollapsible' ). i luga ( 'natia' , galuega () {
- // fai se mea...
- })
Matamata i le fa'ata'ita'iga i lalo.
Valaau e ala ile javascript:
- $ ( '.carousel' ). carousel ()
Igoa | ituaiga | faaletonu | fa'amatalaga |
---|---|---|---|
vaeluaga | numera | 5000 | Le aofa'i o le taimi e fa'atuai ai i le va o le ta'avale otometi se mea. Afai e sese, e le otometi le taamilomilo o le carousel. |
taofi | manoa | "faapepa" | Taofi le uila o le carousel i luga o le isumu ma toe faaauau le uila o le carousel i luga o le isumu. |
E fa'aoga uiga fa'amaumauga mo fa'atonuga muamua ma isi. Siaki le faʻailoga faʻataʻitaʻiga o loʻo i lalo.
- <div id = "myCarousel" vasega = "carousel slide" >
- <!-- Carousel aitema -->
- <div class = "carousel-inner" >
- <div class = "mea aoga" > … </div>
- <div class = "aitema" > … </div>
- <div class = "aitema" > … </div>
- </div>
- <!-- Carousel nav -->
- <a vasega = "carousel-control left" href = "#myCarousel" data-slide = "mua" > ‹ </a>
- <a vasega = "carousel-control right" href = "#myCarousel" data-slide = "next" > › </a>
- </div>
Fa'amataina le carousel i se filifiliga e filifili object
ma amata ai le uila i mea.
- $ ( '.carousel' ). carousel ({
- vaeluaga : 2000
- })
Taamilomilo i aitema carousel mai le agavale i le taumatau.
Taofi le carousel mai le tietie uila i aitema.
Ta'amilomilo le carousel i se fa'avaa fa'apitoa (fa'avae 0, tutusa ma se fa'asologa).
Ta'amilosaga i le mea muamua.
Ta'amilosaga i le isi mea.
O le vasega carousel a Bootstrap o lo'o fa'aalia ai mea e lua mo le fa'aogaina o galuega fa'aoga.
Mea na tupu | Fa'amatalaga |
---|---|
fa'ase'e | E mu vave lenei mea pe a fa'aogaina le slide auala fa'ata'ita'i. |
fa'ase'e | E fa'amu lenei mea pe a mae'a le fa'ase'esega fa'ase'e o le carousel. |
O se mea fa'apipi'i faigofie fa'alautele mo le vave faia o mataitusi mata'itusi ma so'o se fa'aoga tusitusiga.
La'u failaAmata le taina i le fanua o lo'o i lalo e fa'aalia ai fa'ai'uga o le mataitusi.
Valaau le mataitusi e ala i le javascript:
- $ ( '.typeahead' ). mataitusi ()
Igoa | ituaiga | faaletonu | fa'amatalaga |
---|---|---|---|
puna | fa'asologa | [ ] | Le puna o fa'amatalaga e fesiligia. |
mea | numera | 8 | Le numera maualuga o mea e fa'aalia i le pa'u i lalo. |
fa'atusa | galuega faatino | mata'upu e le maaleale | Le auala e fa'aaoga e iloa ai pe fetaui se fesili ma se mea. Talia se finauga e tasi, e item faasaga i le su'ega o le fesili. Avanoa i le fesili o iai nei ma this.query . Fa'afo'i se boolean true pe afai o le fesili e fetaui. |
fa'avasega | galuega faatino | fetaui tonu, mata'upu maaleale, maaleale |
Metotia na fa'aaoga e fa'avasega ai fa'amae'a fa'amae'a. Talia se finauga e tasi items ma ei ai le lautele o le faʻataʻitaʻiga o le mataitusi. Fa'asino le fesili o iai nei ile this.query . |
fa'amalama | galuega faatino | fa'amanino uma fetauiga fa'aletonu | Metotia na fa'aaoga e fa'ailoa ai fa'ai'uga fa'amae'a. Talia se finauga e tasi item ma ei ai le lautele o le faʻataʻitaʻiga o le mataitusi. E tatau ona toe faafoi html. |
Fa'aopoopo uiga fa'amaumauga e fa'amauina ai se elemene ma le fa'aogaina o le mataitusi.
- <input type = "text" data-provide = "typeahead" >
Fa'amataina se fa'aoga i se mataitusi.