Keen qaybaha Bootstrap nolosha-hadda oo wata 12 alwaaxyo jQuery ah .
La habeeyey, laakiin dabacsan, qaado plugin-ka Javascript-ka caadiga ah oo leh shaqada ugu yar ee loo baahan yahay iyo cillado caqli-gal ah.
Ku dar liiska hoos-u-dhaca ku dhawaad wax kasta oo ku jira Bootstrap oo wata plugin fudud. Bootstrap wuxuu leeyahay taageero menu hoos u dhac buuxa oo ku jira navbar, tabs, iyo kaniiniyada.
Isticmaal scrollspy si aad si otomaatig ah u cusboonaysiiso xidhiidhada ku jira navbar kaaga si aad u muujiso xidhiidhka hadda jira ee ku salaysan booska rogid.
Isticmaal plugin-kan si aad uga dhigto tabs iyo kaniiniyada faa'iido badan leh adiga oo u oggolaanaya inay ku dhex wareegaan muraayadaha la taaban karo ee macluumaadka gudaha.
Qaadasho cusub oo ku saabsan jQuery Tipsy plugin, Tooltips kuma tiirsan yihiin sawirada - waxay u isticmaalaan CSS3 animations iyo xogta sifada kaydinta cinwaanka maxaliga ah.
Ku dar waxyaabo yaryar oo dulsaaran, sida kuwa iPadka, shay kasta oo loogu talagalay macluumaadka labaad ee guriyeynta.
* Waxay u baahan tahay Tilmaamaha Qalabka si loogu daro
Plugin-ka digniinta waa fasal aad u yar oo loogu darayo shaqeynta dhow ee digniinaha.
Wax badan ku samee badhamada. Xakamaynta badhanka ayaa sheegaysa ama samee kooxo badhamada qaybo badan sida qalabyada.
U hel qaababka aasaasiga ah iyo taageerada dabacsan ee qaybaha burburi kara sida accordions iyo navigation.
Samee wareeg-ku-meel-gaar ah oo ah xog kasta oo aad rabto inaad bixiso sawir-qaadis nuxur leh.
Qalab aasaasi ah, oo si fudud loo fidiyay si dhakhso ah loogu abuuro madax-qoritaan xarrago leh oo leh qaab kasta oo qoraal ah.
Saamaynta kala-guurka ee fudud, ku dar bootstrap-transition.js hal mar si aad ugu dul-booddo moodalka ama aad u tirtirto digniinaha.
* Looga baahan yahay animation in plugins
La habeeyey, laakiin dabacsan, qaado plugin-ka Javascript-ka caadiga ah oo leh shaqada ugu yar ee loo baahan yahay iyo cillado caqli-gal ah.
Soo deji faylkaHoos waxaa ku yaal qaab la sameeyay.
Mid ka mid ah jirka wanaagsan…
U beddel modal adigoo isticmaalaya javascript adigoo gujinaya badhanka hoose. Hoos ayay u soo degi doontaa oo waxay ka soo geli doontaa xagga sare ee bogga.
Bilaw demo modalKa wac modal ka Javascript:
- $ ( '#myModal' ). moodal ( ikhtiyaar )
Magaca | nooca | default | sharaxaad |
---|---|---|---|
dib-u-dhac | booliyan | run | Waxaa ka mid ah curiyaha qaab-dhabeedka. Beddelkeeda, sheeg static meel-dambe oo aan xidhin habka gujiska. |
kiiboodhka | booliyan | run | Wuxuu xidhaa habka marka furaha baxsadka la riixo |
show | booliyan | run | Muujinaya habka marka la bilaabay. |
Waxaad si fudud ugu dhaqaajin kartaa modal-ka boggaaga adigoon qorin hal xariiq oo javascript ah. Kaliya deji data-toggle="modal"
curiyaha kontoroolka leh data-target="#foo"
ama href="#foo"
u dhigma modal element id, oo marka la gujiyo, waxay bilaabi doontaa habkaaga.
Sidoo kale, si aad ugu darto ikhtiyaarada tusaalahaaga moodeelka ah, kaliya ku dar iyaga sifada xogta dheeraadka ah ee qaybta kontoroolka ama jaantuska laftiisa.
- <a class = "btn" data-toggle = "modal" href = "#myModal" > Qaabka bilawga </a>
- <div class = "Qarin modal" id = "myModal" >
- <div class = "modal-header" >
- <button type = "button" class = "xir" data-dismiss = "modal" > × </button>
- <h3> Madaxa Modal </h3>
- </div>
- <div class = "modal-body" >
- <p> Hal jidh oo wanaagsan… </p>
- </div>
- <div class = "modal-footer" >
- <a href = "#" class = "btn" data-dismiss = "modal" > Xir </a>
- <a href = "#" class = "btn btn-primary" > Keydi isbeddelada </a>
- </div>
- </div>
.fade
fasalka
.modal
curiyaha (tixraac demo si aad tan u aragto) oo ku dar bootstrap-transition.js.
Waxay u hawlgelisaa macluumaadkaaga qaab habaysan. Aqbala ikhtiyaarka ikhtiyaarka ah object
.
- $ ( '#myModal' ). modal ({
- kiiboodhka : been
- })
Gacanta ayaa u roga modal
- $ ( '#myModal' ). moodal ( 'rogrogmi kara' )
Gacanta ayaa u fura modal
- $ ( '#myModal' ). moodal ( 'show' )
Gacanta ayaa u qarisa habka.
- $ ( '#myModal' ). modal ( 'Qarin' )
Bootstrap's modal class wuxuu daaha ka qaadaa dhowr dhacdo oo loogu talagalay in lagu xidho shaqaynta modal.
Dhacdo | Sharaxaada |
---|---|
show | Dhacdadani waxay isla markaaba gubataa marka show habka tusaalaha la yiraahdo. |
tusay | Dhacdadan ayaa la eryaa marka habka loo muujiyo isticmaalaha (waxay sugi doontaa inta u wareejinta css ay dhamaystirayso). |
qari | Dhacdadan ayaa isla markiiba la eryaa marka hide habka tusaale ahaan loo waco. |
qarsoon | Dhacdadan waxa la eryaa marka modalku dhammeeyo in laga qariyo isticmaalaha (waxa ay sugi doontaa inta css kala guurka la dhamaystirayo). |
- $ ( '#myModal' ). daaran ( 'Qarin' , function () {
- // wax samee…
- })
Ku dar liiska hoos-u-dhaca ku dhawaad wax kasta oo ku jira Bootstrap oo wata plugin fudud. Bootstrap wuxuu leeyahay taageero menu hoos u dhac buuxa oo ku jira navbar, tabs, iyo kaniiniyada.
Soo deji faylkaGuji isku xirka nav-ga ee ku yaala navbar iyo kaniiniyada hoose si aad u tijaabiso hoos u dhaca.
Hoos ka wac javascript:
- $ ( '. dropdown-toggle' ). hoos u dhac ()
Si aad si dhakhso ah ugu darto shaqada hoos u dhaca shay kasta kaliya ku dar oo dhibic data-toggle="dropdown"
kasta oo bootstrap sax ah si toos ah ayaa loo hawlgelin doonaa.
data-target="#fat"
ama
href="#fat"
.
- <ul class = "nav nav-pills" >
- <li class = "firfircoon" ><a href = "#" > Xiriirinta joogtada ah </a></li>
- <li class = "hoos u dhac " id = "menu1" >
- <a class = "dropdown-toggle" data-toggle = "hoos u dhac" href = "#menu1" >
- Hoos u dhigid
- <b class = "daryeel" </b>
- </a>
- <ul class = "Dropdown-menu" >
- <li><a href = "#" > Ficil </a></li>
- <li><a href = "#" > Ficil kale </a></li>
- <li><a href = "#" > Wax kale halkan </a></li>
- <li class = "qaybiye" </li>
- <li><a href = "#" > Xiriirinta goonida ah </a></li>
- </ul>
- </li>
- ...
- </ul>
Si aad URL-yada u sii ahaato, isticmaal data-target
sifada beddelkii href="#"
.
- <ul class = "nav nav-pills" >
- <li class = "hoos u dhac" >
- <a class = "dropdown-toggle" data-toggle = "dropdown" data-target = "#" href = "path/to/page.html" >
- Hoos u dhigid
- <b class = "daryeel" </b>
- </a>
- <ul class = "Dropdown-menu" >
- ...
- </ul>
- </li>
- </ul>
Api barnaamijeed loogu talagalay hawlgelinta menus-ka ee navbar la bixiyay ama navigation tab.
Plugin ScrollSpy waxaa loogu talagalay si toos ah cusboonaysiinta bartilmaameedyada nav ku salaysan booska duudduuban.
Soo deji faylkaGuji aagga hoose oo daawo cusboonaysiinta navigation Qodobada hoos u dhaca ayaa sidoo kale la iftiimin doonaa. Isku day!
Ad leggings keytar, brunch id art party dolor labour. Pitchfork yr enim lo-fi ka hor inta aysan iibin qui. Tumblr beer-ilaa-miiska xuquuqda baaskiilka wax kasta ha ahaatee. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby funaanad lomo Jean shorts, williamsburg hoodie minim qui waxaa laga yaabaa inaadan maqlin iyaga iyo cardigan Trust fund culpa biodiesel wes anderson bilicda. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
Veniam marfa shaarib skateboard, oo leh gadhka fugiat velit gadhka. Gadhka xorta ah aliqua cupidatat mcsweeney's vero. Cupidatat afar loko nisi, iyo helvetica nulla carles. Gaariga cuntada ee shaabada leh ee cosby funaanad, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non bilicda jimicsiga quis gentrify. Brooklyn adipisicing craft biir ku xigeenka keytar deserunt.
Occaecat commodo aliqua delectus. Beerka farsamada gacanta ee deserunt skateboard ea. Xuquuqda baaskiilka Lomo adipisicing banh mi, velit ea sunt heerka xiga locavore kafee-kaliya ee magna veniam. Nolosha sare id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim boorsada fariinta. Cred ex in, waarta 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 messenger bag marfa wax alla wixii gaari cunto ah oo delectus ah. Sapiente synth id la qaatay. Locavore sed helvetica cliche bir ah, onkod laga yaabo inaadan maqlin iyaga oo keenaya hoodie gluten-free lo-fi fap aliquip. Labore elit placeat ka hor inta aysan iibin, Terry Richardson oo aad u cad cad brunch nesciunt quis cosby funaanad pariatur keffiyeh ut helvetica artisan. Beerka farsamada gacanta ee Cardigan seitan velit diyaarsan. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco onkod.
Ka wac qoraalka qoraalka ah Javascript:
- $ ( '#navbar' ). scrollspy ()
Si aad si fudud ugu darto dabeecadda scrollspy to your topbar navigation, kaliya ku dar data-spy="scroll"
walxaha aad rabto in aad basaasaan (inta badan sida caadiga ah tani waxay noqon doontaa jidhka).
- <body data-spy = "rogad" > ... </body>
<a href="#home">home</a>
waa in uu u dhigmaa shay ku jira guriga sida
<div id="home"></div>
.
Markaad isticmaalayso scrollspy iyadoo lala kaashanayo ku darista ama ka saarida walxaha DOM, waxaad u baahan doontaa inaad wacdo habka dib u cusboonaysiinta sida:
- $ ( '[xogta-basaasiga = "booq" ). mid kasta ( shaqo () {
- var $ Spy = $ ( kan ). scrollspy ( 'cusbooneysii' )
- }
Magaca | nooca | default | sharaxaad |
---|---|---|---|
dhimis | tirada | 10 | Pixels in laga bilaabo xagga sare marka la xisaabinayo booska rogid. |
Dhacdo | Sharaxaada |
---|---|
firfircooni | Dhacdadani waxay dab kacaysaa mar kasta oo shay cusub uu hawl galo duubista. |
Pluginkani waxa uu ku darayaa tabo degdeg ah, firfircooni leh iyo shaqaynta kiniinka si loogu gudbo nuxurka maxaliga ah.
Soo deji faylkaGuji tabsyada hoose si aad ugu kala beddesho muraayadaha qarsoon, xitaa iyada oo loo marayo liiska hoos u dhaca.
Denim cayriin waxaa laga yaabaa inaadan maqlin iyaga Jean-gaaban Austin. Nesciunt tofu stumptown aliqua, retro synth master nadiifinta. Shaarubaha cliche tempor, williamsburg carles vegan helvetica. Reprehenderit hiliblaha retro keffiyeh dreamcatcher synth. Cosby funaanad eu banh mi, qui irure terry richardson ex squid. Sida loo sameeyo salvia cillum iphone. Seitan aliquip quis cardigan lebbiska Maraykanka, hiliblaha 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 cayriin denim keffiyeh etsy xisbiga fanka ka hor inta aysan iibin Master Cleanse gluten-free Squid scenester freegan cosby funaanad. Fanny pack portland seitan DIY, xaflad farshaxan locavore wolf cliche nolosha sare echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi ka hor inta aysan iibin beer-u-miiska VHS viral locavore cosby funaanad. Lomo yeyda viral, shaarubaha diyaarsan onkod keffiyeh farshaxan biir marfa anshax. Wolf salvia freegan, sartorial keffiyeh echo park vegan.
Ku sahli tab tabsiyada Javascript-ka (tabo kasta waxa ay u baahan tahay in si gaar ah loo hawlgeliyo):
- $ ( '#myTab a' ). guji ( function ( e ) {
- e . ka hortaggaDefault ();
- $ ( kan ). tab ( 'show' );
- })
Waxaad u dhaqaajin kartaa tabs shaqsiyeed dhowr siyaabood:
- $ ( '#myTab a[href="#profile"]' ). tab ( 'show' ); // Dooro tab magac ahaan
- $ ( '#myTab a: first' ). tab ( 'show' ); // Dooro tab ugu horeysa
- $ ( '#myTab a: last' ). tab ( 'show' ); // Dooro tab ugu dambeeya
- $ ( '#myTab li:eq(2) a' ). tab ( 'show' ); // Dooro tab saddexaad (0-indexed)
Waxaad dhaqaajin kartaa tab ama kaniiniga navigation adoon qorin wax javascript ah adigoo si fudud u qeexaya data-toggle="tab"
ama data-toggle="pill"
curiye. Ku darista nav
iyo nav-tabs
xiisadaha tab ul
waxay dabaqi doontaa habaynta tabka bootstrap.
- <ul class = "nav nav-tabs" >
- <li><a href = "#home" data-toggle = "tab" > Guriga </a></li>
- <li><a href = "#profile" data-toggle = "tab" > Profile </a></li>
- <li><a href = "#messages" data-toggle = "tab" > Farriimaha </a></li>
- <li><a href = "#settings" data-toggle = "tab"> Settings </a></li >
- </ul>
Wuxuu hawlgeliyaa curiyaha tab iyo weelka ka kooban. Tabku waa inuu lahaadaa mid data-target
ama meel la href
beegsanayo noodhka weelka ee DOM.
- <ul class = "nav nav-tabs" id = "myTab" >
- <li class = "firfircoon" ><a href = "#guriga" > Guriga </a></li>
- <li><a href = "#profile" > Profile </a></li>
- <li><a href = "#farimaha" > Farriimaha </a></li>
- <li><a href = "#Settings" > Dejinta </a></li>
- </ul>
- <div class = "tab-content" >
- <div class = "tab-pane active" id = "guri" > ... </div>
- <div class = "tab-pane" id = "profile" > ... </div>
- <div class = "tab-pane" id = "farimaha" > ... </div>
- <div class = "tab-pane" id = "settings" > ... </div>
- </div>
- <script>
- $ ( shaqada () {
- $ ( '#myTab a: last' ). tab ( 'show' );
- })
- </script>
Dhacdo | Sharaxaada |
---|---|
show | Dhacdadani waxay ku shidan tahay bandhiga tab, laakiin ka hor intaan tab cusub la muujin. Isticmaal event.target oo event.relatedTarget si aad u beegsato tab firfircoon iyo tabtii hore ee firfircoonayd (haddii la heli karo) siday u kala horreeyaan. |
tusay | Dhacdadani waxay ku gubanaysaa bandhiga tab ka dib marka tab la muujiyo. Isticmaal event.target oo event.relatedTarget si aad u beegsato tab firfircoon iyo tabtii hore ee firfircoonayd (haddii la heli karo) siday u kala horreeyaan. |
- $ ( 'a[data-toggle="tab"]' ). daaran ( 'la tusay' , shaqada ( e ) {
- e . bartilmaameed // tab firfircoon
- e . laxiriiraTarget // tab hore
- })
Waxaa dhiirigeliyay plugin jQuery.tipsy ee aad u wanaagsan oo uu qoray Jason Frame; Tilmaamaha qalabku waa nooc la cusboonaysiiyay, kaas oo aan ku tiirsanayn sawirada, u isticmaal css3 animations, iyo xogta sifada kaydinta cinwaanka maxaliga ah.
Soo deji faylkaKa dul rog xiriirka hoose si aad u aragto qalabyada:
Surwaal dhagan keffiyeh malaha maadan maqlin iyaga. Photo booth gadhka cayriin denim warqad-press vegan messenger bag stumptown. Beer-ilaa-miiska seitan, mcsweeney's fixie sustainable quinoa 8-bit dharka maraykanku waxay leeyihiin terry Richardson vinyl chambray. Gadhka stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, afar loko mcsweeney's chambray vegan nadiif ah. Farsamoyaqaan dhab ah oo biro ah wax kasta oo keytar , scenester farm-to-table banksy Austin twitter handle freegan cred denim ceeriin hal-asalka kafeega viral.
Ku kiciya aaladda javascript:
- $ ( '#tusaale' ). qalab ( ikhtiyaar )
Magaca | nooca | default | sharaxaad |
---|---|---|---|
animation | booliyan | run | Codso u gudubka css libdhi xagga qalabka |
meelaynta | xarig |shaqo | 'sare' | sida loo dhigo tip-tip-top | hoose | bidix | xaq |
dooriye | xadhig | been ah | Haddii la bixiyo doorasho, walxaha tibaaxaha ah waxaa loo igman doonaa bartilmaameedyada la cayimay. |
horyaalka | xadhig | shaqayn | '' | Qiimaha cinwaanka caadiga ah haddii aan 'ciwaanka' taaggu jirin |
kicin | xadhig | 'gaabsi' | sida aaladda loo kiciyo - hover | diiradda | buug-gacmeedka |
dib u dhac | lambarka | walax | 0 | daahitaanka muujinta iyo qarinta aaladda (ms) - kuma khusayso nooca kiciya gacanta Haddii nambar la keeno, dib u dhac ayaa lagu dabaqayaa qarinta/muujinta labadaba Qaab dhismeedka shaygu waa: |
Sababaha waxqabadka awgood, Tooltip iyo Popover data-apis ayaa door biday. Haddii aad jeclaan lahayd inaad isticmaasho kaliya caddee ikhtiyaarka doorashada.
- <a href = "#" rel = "tooltip" title = "tooltip first" > dusha iga bood </a>
Wuxuu ku lifaaqaa gacan hayaha qalab ururinta walxaha.
Waxay daaha ka qaadaysaa aaladda curiyaha
- $ ( '# element' ). qalab tip ( 'show' )
Wuxuu qariyaa calaamadda curiyaha.
- $ ( '# element' ). qalab ( 'Qarin' )
Beddelayaa shay raadka.
- $ ( '# element' ). Tooltip ( 'rogid' )
Ku dar waxyaabo yaryar oo dulsaaran, sida kuwa iPadka, shay kasta oo loogu talagalay macluumaadka labaad ee guriyeynta.
* Waxay u baahan tahay qalab si loogu daro
Soo deji faylkaDul mar badhanka si aad u kiciso popover-ka
U oggolow popovers iyada oo loo marayo Javascript:
- $ ( '#tusaale' ). popover ( doorashooyinka )
Magaca | nooca | default | sharaxaad |
---|---|---|---|
animation | booliyan | run | Codso u gudubka css libdhi xagga qalabka |
meelaynta | xarig |shaqo | 'sax' | sida loo dhigo popover - top | hoose | bidix | xaq |
dooriye | xadhig | been ah | haddii la bixiyo doorasho, walxaha tibaaxaha ah waxaa loo igman doonaa bartilmaameedyada la cayimay |
kicin | xadhig | 'gaabsi' | sida aaladda loo kiciyo - hover | diiradda | buug-gacmeedka |
horyaalka | xadhig | shaqayn | '' | Qiimaha cinwaanka caadiga ah haddii 'cinwaanka' uusan jirin |
nuxurka | xadhig | shaqayn | '' | Qiimaha nuxurka caadiga ah haddii 'data-content' sifo aysan jirin |
dib u dhac | lambarka | walax | 0 | daahitaanka muujinta iyo qarinta popover-ka (ms) - kuma khusayso nooca kiciya gacanta Haddii nambar la keeno, dib u dhac ayaa lagu dabaqayaa qarinta/muujinta labadaba Qaab dhismeedka shaygu waa: |
Sababaha waxqabadka awgood, Tooltip iyo Popover data-apis ayaa door biday. Haddii aad jeclaan lahayd inaad isticmaasho kaliya caddee ikhtiyaarka doorashada.
Wuxuu u bilaabaa popovers ururinta curiyaha.
Waxay daaha ka qaadaysaa curiyayaasha soo booda.
- $ ( '# element' ). popover ( 'muuji' )
Waxay qarisaa curiyayaasha soo booda.
- $ ( '# element' ). popover ( 'Qarin' )
Wuxuu rogaa curiyayaasha soo booda
- $ ( '# element' ). popover ( "rogrogmi" )
Plugin-ka digniinta waa fasal aad u yar oo loogu darayo shaqeynta dhow ee digniinaha.
DownloadPlugin-ka digniinta wuxuu ku shaqeeyaa fariimaha digniinta joogtada ah, wuxuuna xannibaa fariimaha.
Beddel kan iyo taas oo isku day mar kale. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.
U oggolow cayrinta digniinta iyada oo loo marayo Javascript:
- $ ( ". heegan" ). heegan ()
Kaliya ku dar data-dismiss="alert"
batoonkaaga dhow si aad si toos ah u siiso hawlgelinta heeganka dhow.
- <a class = "close" data-dismiss = "alert" href = "#" > × </a>
Waxay ku duubtaa dhammaan digniinaha oo leh shaqeyn dhow. Si ogeysiisyadaadu u soo baxaan marka la xiro, hubi inay haystaan .fade
iyo .in
fasalka mar hore lagu dabaqay iyaga.
Xidhaa digniinta
- $ ( ". heegan" ). heegan ( 'xir' )
Fasalka feejignaanta ee Bootstrap wuxuu daaha ka qaadaa dhowr dhacdo oo loogu talagalay in lagu xidho shaqaynta heeganka.
Dhacdo | Sharaxaada |
---|---|
dhow | Dhacdadani waxay isla markaaba gubataa marka close habka tusaalaha la yiraahdo. |
xiran | Dhacdadan waxa la eryaa marka digniinta la xidho (waxa ay sugi doontaa inta css kala guurka la dhamaystirayo). |
- $ ( '# feejignaantayda' ). xidhi ( 'xiran' , function () {
- // wax samee…
- })
U hel qaababka aasaasiga ah iyo taageerada dabacsan ee qaybaha burburi kara sida accordions iyo navigation.
Soo deji faylka* Waxay u baahan tahay plugin Transition in lagu daro.
Annaga oo adeegsanayna plugin burburka, waxaan dhisnay widget qaab accordion fudud:
Ku oggolow Javascript:
- $ ( ". dumay" ). burbur ()
Magaca | nooca | default | sharaxaad |
---|---|---|---|
waalid | dooriye | been ah | Haddii dooruhu markaas dhammaan walxaha burburi kara ee hoos yimaada waalidka la cayimay waa la xidhi doonaa marka shaygan dumin kara la muujiyo. (oo la mid ah hab-dhaqanka hab-dhaqanka dhaqanka) |
leexleex | booliyan | run | Wuxuu beddelaa cunsurka burburi kara marka la codsado |
Kaliya ku dar data-toggle="collapse"
oo a data-target
curiye si si toos ah loogu qoondeeyo xakamaynta shay burburi kara. Sifadu data-target
waxay aqbashaa css-dooriyaha si loogu dabaqo burburka. U hubso inaad fasalka ku darto collapse
walxaha duminaya. Haddii aad rabto in uu furmo, ku dar fasalka dheeraadka ah in
.
- <button class = "btn btn-danger" data-toggle = "collapse" data-target = "#demo" >
- fudud oo la dumin karo
- </button>
- <div id = "demo" class = "ku dumi" > … </div>
data-parent="#selector"
. Tixraac demo si aad u aragto tan ficil ahaan
Waxay u hawlgelisaa macluumaadkaaga sidii shay burburi kara. Aqbala ikhtiyaarka ikhtiyaarka ah object
.
- $ ( '#my Collapsible' ). burbur ({
- leexo : been
- })
U rogaa shay burburi kara si loo muujiyo ama loo qariyo.
Wuxuu muujiyaa shay burburi kara.
Waxay qarisaa shay burburi kara.
Fasalka burburka Bootstrap wuxuu daaha ka qaadaa dhowr dhacdo oo loogu talagalay ku xirida shaqeynta burburka.
Dhacdo | Sharaxaada |
---|---|
show | Dhacdadani waxay isla markaaba gubataa marka show habka tusaalaha la yiraahdo. |
tusay | Dhacdadan waxa la eryaa marka curiyaha burburku uu muuqdo isticmaaluhu (waxa ay sugi doontaa inta css kala guurka la dhamaystirayo). |
qari | Dhacdadan ayaa isla markiiba la eryaa marka hide habka loo waco. |
qarsoon | Dhacdadan waxa la eryaa marka walxaha burburay laga qariyay isticmaalaha (waxa ay sugi doontaa inta css kala guurka la dhamaystirayo). |
- $ ( '#my Collapsible' ). daaran ( 'Qarin' , function () {
- // wax samee…
- })
Qalab guud oo loogu talagalay baaskiil wadista walxaha. A rery-go-wareeg ah.
Soo deji faylkaHoos ka daawo muuqaalka muuqaalka
Ka wac Javascript:
- $ ( '.carousel' ). carousel ()
Magaca | nooca | default | sharaxaad |
---|---|---|---|
dhexda | tirada | 5000 | Qadarka wakhtiga dib u dhigista udhaxaysa si toos ah shay baaskiil wadida. Haddii ay been tahay, carousel si toos ah uma wareegeyso. |
hakad | xadhig | "hoos u dhac" | Waxa uu hakiyaa baaskiilka carouselka ee mouseenterka oo dib u bilaabaya baaskiilka carouselka ee mouseleave. |
Sifooyinka xogta waxaa loo isticmaalaa kontarooladii hore iyo kan xiga. Hoos ka eeg calaamadaynta tusaalaha.
- <div id = "myCarousel" class = "carousel slide" >
- <!-- Alaabta carousel -->
- <div class = "carousel-inner" >
- <div class = "wax firfircoon" > … </div>
- <div class = "shay" > … </div>
- <div class = "shay" > … </div>
- </div>
- <!-- Carousel nav -->
- <a class = "carousel-control left" href = "#myCarousel" data-slide = "prev" > ‹ </a>
- <a class = "carousel-control right" href = "#myCarousel" data-slide = "ku xiga" > & rsaquo; </a>
- </div>
Waxay ku bilawdaa carousel-ka ikhtiyaar ikhtiyaari ah object
oo bilaabay inuu ku dhex wado alaabta.
- $ ( '.carousel' ). carousel ({
- inta u dhaxaysa : 2000
- })
Wareegtada dhex mara alaabta carouselka bidix ilaa midig.
Karoosalka ka joojiya in uu baaskiil ku dhex maro alaabta.
Wareega karooselka si uu u sameeyo jir gaar ah (0 ku salaysan, oo la mid ah array).
Wareegto shayga hore
Wareegto shayga xiga
Fasalka carousel ee Bootstrap wuxuu daaha ka qaadaa laba dhacdo oo loogu talagalay in lagu xidho shaqeynta carousel.
Dhacdo | Sharaxaada |
---|---|
simbiriirixan | Dhacdadani waxay isla markiiba gubtaa marka slide habka tusaalaha loo yeedho. |
silbadh | Dhacdadan waxa la eryaa marka carouselku dhammeeyo kala-guurka slide-ka. |
Qalab aasaasi ah, oo si fudud loo fidiyay si dhakhso ah loogu abuuro madax-qoritaan xarrago leh oo leh qaab kasta oo qoraal ah.
Soo deji faylkaBilow ku qor goobta hoose si aad u muujiso natiijooyinka nooca-head.
Ka wac typeahead adigoo isticmaalaya javascript:
- $ ( '.typehead' ). qoriga ()
Magaca | nooca | default | sharaxaad |
---|---|---|---|
isha | diyaarin | [ ] | Isha xogta si wax looga weydiiyo. |
alaabta | tirada | 8 | Tirada ugu badan ee alaabta lagu muujinayo hoos u dhaca. |
dheele | shaqayn | kiis aan dareen lahayn | Habka loo isticmaalo in lagu go'aamiyo haddii weydiintu la mid tahay shay. Aqbala hal dood, item ka soo horjeedda oo lagu tijaabiyo weydiinta. Ku gal weydiinta hadda this.query . Soo celi boolean true haddii weydiintu tahay mid isku mid ah. |
kala soocida | shaqayn | u dhigma saxda ah, kiis xasaasi ah, kiis dareen la'aan ah |
Habka loo isticmaalo in lagu kala saaro natiijooyinka otomaatiga ah. Aqbal hal dood items oo leh baaxadda tusaalaha nooca-head. Tixraac su'aalaha hadda jira this.query . |
iftiimiye | shaqayn | ayaa iftiiminaya dhammaan kulammada caadiga ah | Habka loo isticmaalo in lagu muujiyo natiijooyinka otomaatiga ah. Aqbal hal dood item oo leh baaxadda tusaalaha nooca-head. Waa inuu soo celiyaa html |
Ku dar sifada xogta si aad u diiwaan geliso shay leh shaqaynta nooca-head.
- <input type = "text" data-provide = "typeahead" >
Wuxuu ku bilaabayaa wax gelinta oo leh madax-madaxeedka.