Peb Modal plugin yog super slim coj ntawm cov tsoos modal js plugin, saib xyuas tshwj xeeb kom suav nrog tsuas yog cov haujlwm liab qab uas peb xav tau ntawm no ntawm twitter.
Download tau
- $ ( '#my-modal' ). modal ( kev xaiv )
Lub npe | hom | ua ntej | piav qhia |
---|---|---|---|
keeb kwm yav dhau | boolean, hlua | cuav | Xws li ib qho modal-backdrop element. Teem backdrop rau "static" yog tias koj tsis xav kom lub modal kaw thaum lub backdrop yog clicked. |
keyboard | boolean | cuav | Kaw lub modal thaum khiav qhov tseem ceeb yog nias |
ua yeeb yam | boolean | cuav | Qhib modal ntawm chav kawm pib |
Koj tuaj yeem qhib modals ntawm koj nplooj ntawv yooj yim yam tsis tas yuav sau ib kab ntawm javascript. Tsuas yog muab ib lub ntsiab data-controls-modal
lus uas sib haum mus rau lub modal element id, thiab thaum clicked, nws yuav tso koj modal. Txhawm rau ntxiv cov kev xaiv modal, tsuas yog suav nrog lawv ua cov ntaub ntawv tus yam ntxwv thiab.
- <a class="btn" data-controls-modal = "my-modal" data-backdrop = "static"> Launch Modal </a> _ _
Daim Ntawv Ceeb Toom Yog tias koj xav kom koj lub modal animate hauv thiab tawm, tsuas yog ntxiv ib .fade
chav kawm rau koj .modal
lub caij (saib rau qhov demo kom pom qhov no hauv kev nqis tes ua).
Activates koj cov ntsiab lus raws li ib tug modal. Txais ib qho kev xaiv xaiv object
.
- $ ( '#my-modal' ). modal ({
- keyboard : muaj tseeb
- })
Manually toggles ib modal.
- $ ( '#my-modal' ). modal ( 'toggle' )
Manually qhib lub modal.
- $ ( '#my-modal' ). modal ( 'qhia' )
Manually hides ib modal.
- $ ( '#my-modal' ). modal ( 'Hide' )
Rov qab ib qho piv txwv ntawm chav kawm modal.
- $ ( '#my-modal' ). modal ( muaj tseeb )
Daim ntawv ceeb toom Xwb, qhov no tuaj yeem rov qab tau nrog $().data('modal')
.
Bootstrap's modal class exposes ob peb txheej xwm rau hooking rau hauv modal functionality.
Kev tshwm sim | Kev piav qhia |
---|---|
ua yeeb yam | Qhov xwm txheej no tua hluav taws tam sim ntawd thaum show hu ua piv txwv. |
qhia | Qhov kev tshwm sim no raug rho tawm haujlwm thaum lub modal tau ua kom pom rau tus neeg siv (yuav tos rau css kev hloov pauv kom tiav). |
zais | Qhov xwm txheej no raug rho tawm haujlwm tam sim ntawd thaum hide hu ua piv txwv txoj kev. |
zais cia | Qhov kev tshwm sim no raug rho tawm haujlwm thaum lub modal tiav lawm muab zais los ntawm tus neeg siv (yuav tos rau css hloov mus ua kom tiav). |
- $ ( '#my-modal' ). khi ( 'hidden' , function () {
- // ua ib yam dab tsi ...
- })
Cov plugin no yog rau ntxiv kev sib cuam tshuam rau lub bootstrap topbar lossis tabbed navigations.
Download tau
- $ ( '#topbar' ). poob ( )
Txhawm rau nrawm ntxiv kev ua haujlwm poob rau txhua lub ntsiab lus nav, siv tus data-dropdown
cwj pwm. Ib qho kev siv tau bootstrap dropdown yuav cia li qhib.
- <ul class = "tabs" >
- <li class = "active" ><a href = "#"> Tsev </a></li >
- <li class = "dropdown" data-dropdown = "dropdown" >
- <a href="#" class="dropdown-toggle"> Dropdown </a> _ _ _ _ _
- <ul class = "dropdown-menu" >
- <li><a href = "#" > Secondary link </a></li>
- <li><a href = "#" > Lwm yam ntawm no </a></li>
- <li class = "divider" ></li>
- <li><a href="#"> Lwm qhov txuas </a> </li>
- </ul>
- </li>
- </ul>
Daim Ntawv Ceeb Toom Yog tias koj lub ui muaj ntau qhov kev poob qis, xav txog kev ntxiv tus data-dropdown
cwj pwm rau lub thawv tseem ceeb dua li .tabs
lossis .topbar
.
Ib qho programatic api rau qhib cov ntawv qhia zaub mov rau qhov muab topbar lossis tabbed navigation.
Qhov plugin no yog ntxiv rau scrollspy (pib hloov kho nav) kev sib cuam tshuam rau bootstrap topbar.
Download tau
- $ ( '#topbar' ). scrollSpy ( )
Txhawm rau yooj yim ntxiv scrollspy tus cwj pwm rau koj nav, tsuas yog ntxiv tus data-scrollspy
cwj pwm rau .topbar
.
- <div class = "topbar" data-scrollspy = "scrollspy" > ... </div>
Nws pib qhib cov nyees khawm navigation los ntawm cov neeg siv scroll txoj haujlwm.
- $ ( 'lub cev> .topbar' ). scrollSpy ( )
Daim Ntawv Ceeb Toom Topbar thauj tog rau nkoj yuav tsum muaj lub hom phiaj id daws tau. Piv txwv li, ib tug <a href="#home">home</a>
yuav tsum sib haum mus rau ib yam dab tsi nyob rau hauv lub dom zoo li <div id="home"></div>
.
Lub scrollspy caches nav nyees khawm thiab seem tswj kev ua haujlwm. Yog tias koj xav tau hloov kho qhov cache no (tej zaum yog tias koj muaj cov ntsiab lus dynamic) tsuas yog hu rau qhov kev hloov tshiab no. Yog tias koj siv cov ntaub ntawv tus cwj pwm los txhais koj cov scrollspy, tsuas yog hu rau refresh ntawm lub cev.
- $ ( 'lub cev' ). scrollSpy ( 'tshiab' )
Txheeb xyuas qhov topbar navigation ntawm nplooj ntawv no.
Cov plugin no ntxiv ceev, dynamic tab thiab cov ntsiav tshuaj ua haujlwm.
Download tau
- $ ( '.tabs' ). tabs ( )
Koj tuaj yeem qhib lub tab lossis ntsiav tshuaj navigation yam tsis tau sau ib qho javascript los ntawm tsuas yog muab rau lawv data-tabs
lossis data-pills
tus cwj pwm.
- <ul class = "tabs" data-tabs = "tabs" > ... </ul>
Activates tab thiab ntsiav tshuaj functionality rau ib lub thawv muab. Tab txuas yuav tsum siv id's hauv daim ntawv.
- <ul class = "tabs" >
- <li class = "active" ><a href = "#home"> Tsev </a></li >
- <li><a href = "#profile"> Profile </a> </li>
- <li><a href = "#messages"> Messages </a> </li>
- <li><a href = "#settings" > Settings </a></li>
- </ul>
- <div class = "pill-content" >
- <div class = "active" id = "tsev" > ... </div>
- <div id = "profile" > ... </div>
- <div id = "messages" > ... </div>
- <div id = "settings" > ... </div>
- </div>
- <script>
- $ ( function () {
- $ ( '.tabs' ). tabs ( )
- })
- </script>
Kev tshwm sim | Kev piav qhia |
---|---|
hloov | Qhov xwm txheej no tua hluav taws ntawm kev hloov tab. Siv event.target thiab event.relatedTarget tsom rau lub tab active thiab yav dhau los active tab feem. |
- $ ( '#.tabs' ). khi ( 'hloov' , ua haujlwm ( e ) {
- e . phiaj // activated tab
- e . RelatedTarget // yav dhau los tab
- })
Raw denim tej zaum koj tsis tau hnov txog lawv cov ris tsho luv Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit neeg tua tsiaj retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, neeg tua tsiaj 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.
Banksy do proident, brooklyn photo booth delectus sunt artisan sed organic exercitation eiusmod four loko. Quis tattooed iphone esse aliqua. Master cleanse vero fixie mcsweeney's. Ethical portland aute, irony food truck pitchfork lomo eu anim. Aesthetic blog DIY, ethical beard leggings tofu consequat whatever cardigan nostrud. Helvetica you probably haven't heard of them carles, marfa veniam occaecat lomo before they sold out in shoreditch scenester sustainable thundercats. Consectetur tofu craft beer, mollit brunch fap echo park pitchfork mustache dolor.
Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seitan squid ad wolf bicycle rights blog. Et aute readymade farm-to-table carles 8-bit, nesciunt nulla etsy adipisicing organic ea. Master cleanse mollit high life, next level Austin nesciunt american apparel twee mustache adipisicing reprehenderit hoodie portland irony. Aliqua tofu quinoa +1 commodo eiusmod. High life williamsburg cupidatat twee homo leggings. Four loko vinyl DIY consectetur nisi, marfa retro keffiyeh vegan. Fanny pack viral retro consectetur gentrify fap.
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.
Raws li qhov zoo tshaj plaws jQuery.tipsy plugin sau los ntawm Jason Frame; twipsy yog qhov hloov kho tshiab, uas tsis tso siab rau cov duab, siv css3 rau cov yeeb yaj kiab, thiab cov ntaub ntawv-tus cwj pwm rau lub npe cia!
Download tau
- $ ( '#example' ). twipsy ( Options )
Lub npe | hom | ua ntej | piav qhia |
---|---|---|---|
animate | boolean | muaj tseeb | siv css ploj mus rau cov lus qhia |
ncuaIn | tus lej | 0 | ncua ua ntej qhia cov lus qhia (ms) |
ncua sij hawm | tus lej | 0 | ncua ua ntej zais tooltip (ms) |
poob rov qab | txoj hlua | '' | cov ntawv siv thaum tsis muaj cov lus qhia lub npe tam sim no |
tso chaw | txoj hlua | 'saib saum toj' | yuav ua li cas rau position lub tooltip - saum toj no | hauv qab no | sab laug | txoj cai |
html | boolean | cuav | tso cai html cov ntsiab lus nyob rau hauv tooltip |
nyob | boolean | cuav | siv cov txheej xwm delegation es tsis txhob ntawm tus neeg tuav cov xwm txheej |
offset | tus lej | 0 | pixel offset ntawm tooltip los ntawm lub hom phiaj caij |
lub npe | txoj hlua, ua haujlwm | 'lub npe' | tus cwj pwm lossis txoj hauv kev los muab cov ntawv sau npe |
ua rau | txoj hlua | 'hover' | yuav ua li cas tooltip yog triggered - hover | tsom | phau ntawv |
tus qauv | txoj hlua | [default markup] | html template siv los ua ib tug twipsy. |
Daim Ntawv Ceeb Toom Ib tus neeg twipsy piv txwv cov kev xaiv tuaj yeem raug teev los ntawm kev siv cov ntaub ntawv cwj pwm.
- <a href = "#" data-placement = "hauv qab" rel = 'twipsy' title = 'Qee lub npe ntawv' > ntawv </a>
Txuas tus twipsy handler rau ib qho khoom sau.
Tshaj tawm cov ntsiab lus twipsy.
- $ ( '#element' ). twipsy ( 'show' )
Hide ib tug twipsy.
- $ ( '#element' ). twipsy ( 'hide' )
Rov qab cov ntsiab lus twipsy chav kawm piv txwv.
- $ ( '#element' ). twipsy ( true )
Daim ntawv ceeb toom Xwb, qhov no tuaj yeem rov qab tau nrog $().data('twipsy')
.
Tight ris tom ntej no keffiyeh tej zaum koj yuav tsis tau hnov txog lawv. Diam duab lub rooj muag zaub beard raw denim letterpress vegan tub txib hnab stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-ntsis american apparel muaj terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, plaub loko mcsweeney's cleanse vegan chambray. Ib tug neeg txawj ntse tiag tiag txawm li cas los xij keytar, scenester ua liaj ua teb-rau- rooj banksy Austin twitter tuav freegan cred nyoos denim ib leeg-hauv paus kas fes viral.
Lub popover plugin muab qhov yooj yim interface rau ntxiv popovers rau koj daim ntawv thov. Nws txuas ntxiv lub bootstrap-twipsy.js plugin, yog li nco ntsoov khaws cov ntaub ntawv ntawd thiab thaum suav nrog popovers hauv koj qhov project!
Daim ntawv ceeb toom Koj yuav tsum suav nrog cov ntaub ntawv bootstrap-twipsy.js ua ntej bootstrap-popover.js.
Download tau
- $ ( '#example' ). popover ( kev xaiv )
Lub npe | hom | ua ntej | piav qhia |
---|---|---|---|
animate | boolean | muaj tseeb | siv css ploj mus rau cov lus qhia |
ncuaIn | tus lej | 0 | ncua ua ntej qhia cov lus qhia (ms) |
ncua sij hawm | tus lej | 0 | ncua ua ntej zais tooltip (ms) |
poob rov qab | txoj hlua | '' | cov ntawv siv thaum tsis muaj cov lus qhia lub npe tam sim no |
tso chaw | txoj hlua | 'txoj cai' | yuav ua li cas rau position lub tooltip - saum toj no | hauv qab no | sab laug | txoj cai |
html | boolean | cuav | tso cai html cov ntsiab lus nyob rau hauv tooltip |
nyob | boolean | cuav | siv cov txheej xwm delegation es tsis txhob ntawm tus neeg tuav cov xwm txheej |
offset | tus lej | 0 | pixel offset ntawm tooltip los ntawm lub hom phiaj caij |
lub npe | txoj hlua, ua haujlwm | 'lub npe' | tus cwj pwm lossis txoj hauv kev los muab cov ntawv sau npe |
cov ntsiab lus | txoj hlua, ua haujlwm | 'cov ntaub ntawv-cov ntsiab lus' | ib txoj hlua los yog txoj hauv kev los muab cov ntsiab lus ntawm cov ntawv. yog tias tsis muaj, cov ntsiab lus yuav tau txais los ntawm cov ntaub ntawv-cov ntsiab lus tus cwj pwm. |
ua rau | txoj hlua | 'hover' | yuav ua li cas tooltip yog triggered - hover | tsom | phau ntawv |
tus qauv | txoj hlua | [default markup] | Lub html template siv rau rendering ib popover. |
Daim ntawv ceeb toom Ib tus neeg popover piv txwv cov kev xaiv tuaj yeem raug teev los ntawm kev siv cov ntaub ntawv cwj pwm.
- <a data-placement = "hauv qab" href = "#" class = "btn txaus ntshai" rel = "popover" > ntawv </a>
Initializes popovers rau ib qho khoom sau.
Tshaj tawm cov ntsiab lus popover.
- $ ( '#element' ). popover ( 'show' )
Hide cov ntsiab lus popover.
- $ ( '#element' ). popover ( 'hide' )
Lub ceeb toom plugin yog ib chav kawm me me ntxiv rau kev ua haujlwm ze rau kev ceeb toom.
Download tau
- $ ( ".alert-message" ). ceeb toom ( )
Tsuas yog ntxiv tus data-alert
cwj pwm rau koj cov lus ceeb toom kom cia li muab lawv kaw ua haujlwm.
Lub npe | hom | ua ntej | piav qhia |
---|---|---|---|
xaiv | txoj hlua | '.kaw' | Dab tsi selector rau lub hom phiaj kaw qhov ceeb toom. |
Wraps tag nrho cov lus ceeb toom nrog ze functionality. Txhawm rau kom koj cov lus ceeb toom tawm thaum kaw, xyuas kom lawv muaj cov chav kawm .fade
thiab .in
cov chav kawm twb tau thov rau lawv.
Kaw ceeb toom.
- $ ( ".alert-message" ). ceeb toom ( 'kaw' )