Bootstrap-a component hrang hrangte chu nunna pe rawh—tunah chuan custom jQuery plugin 13 a awm tawh.
Plugin te hi pakhat zel (a then chuan dependency mamawh nei mahse), a nih loh leh vawi khatah dah vek theih a ni. Bootstrap.js leh bootstrap.min.js te hian file pakhatah plugin zawng zawng an nei vek a.
Bootstrap plugin zawng zawng hi JavaScript line khat pawh ziak lovin markup API hmang chauhvin i hmang thei ang. Hei hi Bootstrap-a first class API a ni a, plugin i hman hunah i ngaihtuah hmasak ber tur a ni.
Chutiang a nih lai chuan, dinhmun thenkhatah chuan he functionality hi off hi duhthusam a ni thei. Chuvangin, `'data-api'` hmanga body namespaced-a thil thleng zawng zawng unbind-a data attribute API tihtawp theihna pawh kan pe bawk. Hei hi hetiang hian a lang:
- $ ( 'taksa' ). off ( '.data-api' ) tih a ni.
A dang pawhin, plugin bik target tur chuan plugin hming chu namespace atan data-api namespace nen hetiang hian dah mai rawh:
- $ ( 'taksa' ). off ( '.alert.data-api' ) tih a ni.
Tin, Bootstrap plugin zawng zawng hi JavaScript API hmang chauhvin i hmang thei tur a ni tih kan ring bawk. Public API zawng zawng hi single, chainable method a ni a, collection acted on chu a rawn pe kir vek a ni.
- $ ( ".btn.hlauhawm" ). button ( "toggle" tih kha ). addClass ( "thau" ) a ni.
Method zawng zawng hian optional options object, method bik target tu string emaw, engmah (default behavior hmanga plugin initiate tu) emaw an pawm tur a ni:
- $ ( "#kaModal" ). modal () // default hmanga initialized a ni
- $ ( "#kaModal" ). modal ({ keyboard : false }) // keyboard awm lovin initialized a ni
- $ ( "#kaModal" ). modal ( 'show' ) // show chu a initialize a, a invoke nghal bawk
Plugin tin hian an raw constructor chu `Constructor` property-ah an expose bawk: $.fn.popover.Constructor
. Plugin instance bik i hmuh duh chuan element atanga direct-in la chhuak rawh: $('[rel=popover]').data('popover')
.
A chang chuan Bootstrap plugins te hi UI framework dang nen hman a ngai thin. Hetiang dinhmunah hian namespace collision a awm fo thin. Chutiang a nih chuan i .noConflict
value revert duh plugin chu i call thei ang.
- var bootstrapButton = $ 1000 a ni a, a man pawh a tlawm hle. fn a ni. button chu a rawn lang a. noConflict () // $.fn.button chu a hmaa value pek tawhah a rawn pe leh ang
- $ a ni. fn a ni. bootstrapBtn = bootstrapButton // $().bootstrapBtn hnenah bootstrap hnathawh dan tur pe rawh
Bootstrap hian plugin-a thil tih danglam bik tam zawk atan custom event a pe a. A tlangpuiin, hengte hi infinitive leh past participle form-ah an lo thleng a - chutah chuan show
thilthleng pakhat tan tirh lamah infinitive (ex. ) chu a insiam a, a past participle form (ex. shown
) chu thiltih zawh hunah a trigger a ni.
Infinitive event zawng zawng hian preventDefault functionality a pe vek a. Hei hian action pakhat execution chu a tan hmaa tihtawp theihna a pe a ni.
- $ ( '#kaModal' ). on ( ' entir' , function ( e ) { .
- if (! data ) return e . preventDefault () // modal a lan loh tur a titawp
- }) tih a ni.
Transition effect awlsam tak tak atan chuan JS file dangte bulah bootstrap-transition.js vawi khat dah tel bawk ang che. Compiled (or minified) bootstrap.js i hman chuan hei hi dah tel a ngai lo—a awm tawh.
Transition plugin entirnan tlemte:
Modal te hi streamlined, mahse flexible, dialog prompts a awm a, functionality mamawh tlem ber leh smart defaults te a awm bawk.
Footer-a header, body leh action set awmna rendered modal.
Taksa tha tak pakhat...
- <div class = "modal thup bo" >
- <div class = "modal-a thupui" >
- <button type = "button" class = "khar" data-dismiss = "modal" aria-thup = "dik" > × </button> tih a ni
- <h3> Modal header </h3> tih a ni
- </div> tih a ni
- <div class = "taksa-modal" > tih hi a ni
- <p> Taksa tha tak pakhat... </p>
- </div> tih a ni
- <div class = "modal-a hnuai lam" >
- <a href = "#" class = "btn" > khar rawh </a>
- <a href = "#" class = "btn btn-primary" > Thil danglamte chu dahkhawm rawh </a>
- </div> tih a ni
- </div> tih a ni
JavaScript hmangin modal pakhat toggle la, a hnuaia button hi click la. A hnuai lam a pan ang a, page chunglam atang chuan a fade in ang.
- <!-- Modal trigger tur button -->
- <a href = "#myModal" role = "button" class = "btn" data-toggle = "modal" > Demo modal chu tlangzarh rawh </a>
- <!-- Modal --> tih a ni
- <div id = "kaModal" class = "modal thup fade" tabindex = "-1" role = "dialog" aria-labelledby = "kaModalLabel" aria-thup = "dik" >
- <div class = "modal-a thupui" >
- <button type = "button" class = "khar" data-dismiss = "modal" aria-thup = "dik" > × </button>
- <h3 id = "myModalLabel" > A chhuahna tur hmun leh a hmanna tur hmun </h3 >
- </div> tih a ni
- <div class = "taksa-modal" > tih hi a ni
- <p> Taksa tha tak pakhat... </p>
- </div> tih a ni
- <div class = "modal-a hnuai lam" >
- <button class = "btn" data-dismiss = "modal" aria-hidden = "dik" > Khar rawh </button>
- <button class = "btn btn-primary" > Thil danglamte chu save rawh </button>
- </div> tih a ni
- </div> tih a ni
JavaScript ziak lovin modal pakhat activate rawh. data-toggle="modal"
Controller element, button ang chi, a data-target="#foo"
or href="#foo"
toggle tur modal bik target tur nen set rawh .
- <button type = "button" data-toggle = "modal" data-target = "#myModal" > Modal </button> tihchhuah a ni
myModal
JavaScript line khata id nei modal chu ko rawh :
- $ ( '#kaModal' ). modal ( duhthlan tur ) .
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-backdrop=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
backdrop a ni | boolean a ni | dik | Modal-backdrop element a awm bawk. static A nih loh leh, click-a modal khar lo backdrop atan specify bawk ang che. |
keyboard hmangin a ziak a | boolean a ni | dik | Escape key i hmet chuan modal a khar thin |
lantir | boolean a ni | dik | Initialized hunah modal a lantir. |
hla | kawng | diklo | Remote url pek a nih chuan jQuery’s
|
I content chu modal angin a activate thin. A pawm a, optional options a awm object
bawk .
- $ ( '#kaModal' ). modal ({ ) a ni.
- keyboard : a dik lo
- }) tih a ni.
Modal pakhat chu manual in a toggle thin.
- $ ( '#kaModal' ). modal ( 'toggle' tih a ni.
Manual takin modal a hawng thin.
- $ ( '#kaModal' ). modal ( 'tihlan rawh' ) .
Manual takin modal a thup thin.
- $ ( '#kaModal' ). modal ( ‘thup’ ) tih a ni.
Bootstrap-a modal class hian modal functionality-a hooking-na tur event tlemte a pholang a ni.
Hunbik | Hrilhfiahna |
---|---|
lantir | show He event hi instance method kan koh chuan a fire nghal vek a ni. |
tih a ni | He event hi modal chu user hmuh theiha siam a nih hunah fire a ni (css transitions zawh hun a nghak ang). |
biru | hide He event hi instance method koh a nih chuan a fire nghal a ni. |
thuhruk | He event hi modal chu user hnen atanga thup a nih zawh chuan a fire thin (css transitions zawh hun a nghak ang). |
- $ ( '#kaModal' ). on ( 'thup' , hnathawh () { .
- // thil engemaw ti rawh...
- }) tih a ni.
He plugin awlsam tak hmang hian engkim deuhthaw-ah dropdown menu dah belh la, navbar, tabs, leh pills te pawh a tel.
data-toggle="dropdown"
Link emaw button emaw ah dah la , dropdown toggle rawh.
- <div class = "a hnuai lam" >
- <a class = "dropdown-toggle" data-toggle = "dropdown" href = "#" > A chhuah dawn chuan a chhuak leh ta a, a chhuah dawn chuan a chhuak leh ta a
- A rilru a buai em em a, a rilru a hah em em bawk a, a rilru a buai em em bawk a , a rilru a hah em em bawk a . aria- labelledby = " dLabel " >
- ...
- </ul> tih a ni
- </div> tih a ni
URL te chu a awm reng theih nan , data-target
tih aiah attribute hmang la href="#"
.
- <div class = "a hnuai lam" >
- <a class = "a chhuah theihna tur" id = "dLabel" role = "button" data-toggle = "a chhuahna tur" data-target = "#" href = "/page.html" >
- Dropdown a ni
- < b class = "caret" tih hi a awmzia a awm lo
- </a> tih a ni
- A rilru a buai em em a, a rilru a hah em em bawk a, a rilru a buai em em bawk a , a rilru a hah em em bawk a . aria- labelledby = " dLabel " >
- ...
- </ul> tih a ni
- </div> tih a ni
JavaScript hmangin dropdown te chu call la:
- $ ( '.thlauhna-toggle' ). dropdown () a ni.
Pakhatmah
Navbar emaw tabbed navigation pek tawh pakhat tana menu toggling na tur programmatic api.
ScrollSpy plugin hi scroll position a zirin nav target te automatic a update theihna tur a ni. Navbar hnuaia area chu scroll la, active class inthlak dan chu en rawh. Dropdown sub items te pawh a rawn lang ang.
A rilru a buai em em a, a rilru a hah em em bawk a. Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi an hralh chhuah hma qui. Tumblr farm-to-table bicycle dikna eng pawh ni se. Anim keffiyeh chuan carles cardigan a ti a. Velit seitan mcsweeney thlalak booth 3 savawm thla irure. A rilru a buai em em a, a rilru a hah em em bawk a, a rilru a buai em em bawk a, a rilru a hah em em bawk a, a rilru a hah em em bawk a, a rilru a hah em em bawk a. et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh kut hnathawktu ullamco consequat.
Veniam marfa hmul nei skateboard, adipisicing fugiat velit pitchfork hmul. A rilru a buai em em a, a rilru a hah em em bawk a. mcsweeney's vero. Cupidatat pali loko nisi, ea helvetica nulla carles. Tattoo nei cosby sweater ei tur phur truck, mcsweeney-a quis non freegan vinyl a ni. Lo-fi wes anderson +1 chuan a rawn ti a. A rilru a buai em em a, a rilru a hah em em bawk a. Carles non aesthetic exercise quis gentrify. Brooklyn adipisicing kutchhuak beer vice keytar deserunt.
Occaecat commodo a ni a, a hnah hi a hring vek a ni. A rilru a buai em em a, a rilru a hah em em bawk a. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore pakhat chauh awmna coffee in magna veniam. Nunna sang id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS chuan a ti a. Consectetur nisi DIY messenger bag tlem ber a ni. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a. 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 eng pawh delectus ei tur phur truck. A rilru a buai em em a, a rilru a hah em em bawk a. id assumenda. Locavore sed helvetica cliche irony, thundercats te hi i hre lo mai thei consequat hoodie gluten-free lo-fi fap aliquip. Laboure elit placeat an hralh zawh hmain, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan siam fel vek velit a ni. VHS chambray laboris hun rei lote chhunga hman theih a ni. A rilru a buai em em a, a rilru a hah em em bawk a.
I topbar navigation-a awlsam taka scrollspy behavior dah belh data-spy="scroll"
tur chuan spy duh element-ah dah mai la (a tlangpuiin hei hi body a ni ang) leh data-target=".navbar"
eng nav nge hman tur tih thlang rawh. Component pakhat nen scrollspy i hmang duh ang .nav
.
- <taksa data-spy = "scroll" data-target = ".navbar" > ... </body> tih hi a ni
JavaScript hmangin scrollspy chu ko rawh:
- $ ( '#navbar' tih chu a ni). lehkhabu zial () .
<a href="#home">home</a>
chu dom-a thil awm ang chi nen a inmil tur a
<div id="home"></div>
ni.
DOM atanga elements dah belh emaw paih emaw nena inzawma scrollspy hman hian refresh method chu hetiang hian i ko a ngai ang:
- $ ( '[data-spy="scroll"]' tih a ni ang. pakhat zel ( hnathawh () { .
- var $spy = $ ( hei hi ) a ni. scrollspy ( ‘thar thar’ ) tih a ni.
- });
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-offset=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
offset a ni | a zat | 10 a ni | Scroll awmna tur chhut hunah chunglam atanga offset tur pixels. |
Hunbik | Hrilhfiahna |
---|---|
activate rawh | He event hi scrollspy-in item thar a activate apiangin a fire thin. |
Local content pane hmanga transition-ah tab functionality rang tak, chak tak dah belh la, dropdown menu hmang pawhin.
Raw denim i la hre lo mai thei jean shorts Austin. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a. Retro synth master cleanse. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a. A rilru a buai em em a, a rilru a hah em em bawk a. dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid a ni a, a man pawh a tlawm hle. A rilru a buai em em a, a rilru a hah em em bawk a. salvia cillum iphone. Seitan aliquip quis cardigan american thawmhnaw, sa thattu 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 an hralh chhuah hmaa master cleanse gluten-free squid scenester freegan cosby sweater. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi an hralh chhuah hma khan farm-to-table VHS viral locavore cosby sweater an hralh chhuak a. Lomo savawm viral, hmul readymade thundercats keffiyeh craft beer marfa ethical. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a. echo park vegan.
JavaScript hmangin tabbable tab te chu enable rawh (tab tin hi a hranin activate a ngai a ni):
- $ ( '#kaTab a' ). click ( function ( e )) chu a rawn lang a.
- e . venhimnaDefault ();
- $ ( hei hi ). tab ( 'entir rawh' );
- }) tih a ni.
Tab hrang hrangte chu kawng hrang hrangin i activate thei ang:
- $ ( '#kaTab a[href="#profile"]' ). tab ( 'entir rawh' ); // Tab hming hmangin thlang rawh
- $ ( '#kaTab a: hmasa ber' ). tab ( 'entir rawh' ); // Tab hmasa ber thlang rawh
- $ ( '#kaTab a:a hnuhnung ber' ). tab ( 'entir rawh' ); // Tab hnuhnung ber thlang rawh
- $ ( '#ka Tab li:eq(2) a' ). tab ( 'entir rawh' ); // Tab pathumna thlang rawh (0-indexed) .
JavaScript engmah ziak lovin tab emaw pill navigation emaw chu element pakhat specify data-toggle="tab"
emaw on emaw mai mai hmangin i activate thei a ni. Tab-a and class te data-toggle="pill"
dah chuan Bootstrap tab styling a apply ang.nav
nav-tabs
ul
- <ul class = "nav-tabs" > tih hi a awmzia a awm lo
- <li><a href = "#in" data-toggle = "tab" > A chhuahna tur hmun </a> </li>
- <li><a href = "#profile" data-toggle = "tab" > A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a
- <li><a href = "#thuchah" data-toggle = "tab" > Thuchah </a></li>
- <li><a href = "#settings" data-toggle = "tab" > A chhuahna tur hmun leh a hmanna tur hmun </a></li>
- </ul> tih a ni
Tab element leh content container pakhat a activate thin. Tab hian DOM ah container node targeting a data-target
emaw a nei tur a ni.href
- A rilru a buai em em a, a rilru a hah em em bawk a. id = " myTab " >
- <li class = "active" ><a href = "#in" > In leh lo </a></li>
- <li><a href = "#profile" > A chhuahna tur hmun leh a hmanna tur hmun </a></li>
- <li><a href = "#thuchah" > Thuchah </a></li>
- <li><a href = "#settings" > A chhuahna tur hmun leh a hmanna tur hmun </a></li>
- </ul> tih a ni
- <div class = "tab-a thu awmte" >
- <div class = "tab-pane active" id = "in" > ... </div> tih a ni
- A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a. <div class = "tab-pane" id = "profile" > ... </div>
- <div class = "tab-pane" id = "thuchah" > ... </div> tih a ni
- <div class = "tab-pane" id = "settings" > ... </div> tih hi a ni
- </div> tih a ni
- <script> tih a ni
- $ ( hnathawh () { .
- $ ( '#kaTab a:a hnuhnung ber' ). tab ( 'entir rawh' );
- }) tih a ni.
- </script> tih a ni
Hunbik | Hrilhfiahna |
---|---|
lantir | He event hi tab show-ah a fire a, mahse tab thar a lan hmain a fire thin. Active tab leh a hmaa active tab (a awm chuan) te target turin event.target and hmang ang che .event.relatedTarget |
tih a ni | He event hi tab pakhat a lan hnuah tab show ah a fire thin. Active tab leh a hmaa active tab (a awm chuan) te target turin event.target and hmang ang che .event.relatedTarget |
- $ ( 'a[data-toggle="tab"]' tih a ni a, a hlawhtlinna chu a hlawhtlinna a ni. on ( 'a entir' , function ( e ) { .
- e . target // tihchhuah tab a ni
- e . relatedTarget // tab hmasa ber a ni
- }) tih a ni.
Jason Frame ziah jQuery.tipsy plugin tha tak atanga infuih thar; Tooltips hi updated version a ni a, image-ah a innghat lo va, animation atan CSS3 a hmang a, local title storage atan data-attribute a hmang bawk.
Performance avang hian tooltip leh popover data-apis te hi opt in a ni a, chu chu nangmah ngeiin i initialize tur tihna a ni .
A hnuaia link te hi hover la, tooltips i hmu ang:
Tight pants next level keffiyeh i la hre lo ngei ang. Thlalak booth hmul raw denim letterpress vegan palai bag stumptown. Farm-to-table seitan, mcsweeney-a fixie sustainable quinoa 8-bit american apparel te chuan terry richardson vinyl chambray an nei a, an thil siam chu an hlim hle. Beard stumptown, cardigans banh mi lomo zing khawvar. Tofu biodiesel williamsburg marfa, pali loko mcsweeney chuan vegan chambray a tifai a. A really ironic artisan whatever keytar , scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral a ni.
Bootstrap input groups nena tooltips leh popovers i hman hian container
duh loh side effects awm loh nan (a hnuaia documented) option kha i set a ngai ang.
JavaScript hmangin tooltip chu trigger la:
- $ ( '#entirna' ). tooltip ( duhthlan tur ) .
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-animation=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
animation tih a ni | boolean a ni | dik | tooltip ah css fade transition hmangin apply rawh |
html tih a ni | boolean a ni | diklo | Tooltip ah hian html dah la. False a nih chuan jquery’s text method hmangin dom chhungah content kan dah ang. XSS attack i ngaihtuah chuan text hmang rawh. |
dahna tur hmun a ni | string | thiltih | 'chung' | tooltip dah dan tur - chunglam | hnuai lam | veilam | dik |
selector a ni | hrui | diklo | Selector pek a nih chuan tooltip objects chu target tarlan te hnenah delegate a ni ang. |
nihna | string | thiltih | '' tih a ni. | `title` tag a awm loh chuan default title value a ni |
ti per | hrui | 'hover focus' tih a ni. | tooltip a trigger dan - | tih kha click la hover rawh | focus | kuta thawh. Hriat tur chu i case pass trigger mutliple, space seperated, trigger chi hrang hrang. |
titlai | number | thil | 0 a ni | tooltip (ms) entir leh thup delay - manual trigger type-ah a hman loh Number supply a nih chuan hide/show pahnih ah delay a awm vek a ni Thil awm dan tur chu: |
container a ni | string | diklo | diklo | Tooltip chu element bik pakhatah a append thin |
- <a href = "#" data-toggle = "hmanrua" title = "hmanrua hmasa ber" > ka chungah hover rawh </a>
Element collection pakhatah tooltip handler a attache thin.
Element pakhat tooltip a pholang.
- $ ( '#element' tih chu a ni). tooltip ( 'tihlan rawh' ) .
Element pakhat tooltip a thup thin.
- $ ( '#element' tih chu a ni). hmanrua ( ‘thup’ ) .
Element pakhat tooltip a toggle thin.
- $ ( '#element' tih chu a ni). hmanrua ( 'toggle' ) tih a ni.
Element pakhat tooltip a thup a, a tichhia bawk.
- $ ( '#element' tih chu a ni). tooltip ( ‘tihchhiat’ ) .
Secondary information dahna tur element eng pawhah iPad-a awm ang chi content overlay te te te dah belh rawh. Popover chu trigger turin button chungah hover rawh. Tooltip dah tel a ngai.
Option pali a awm a, chunglam, dinglam, hnuai lam, leh veilam aligned te an ni.
A rilru a buai em em a, a rilru a hah em em bawk a. Aenean eu leo quam a ni. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a.
A rilru a buai em em a, a rilru a hah em em bawk a. Aenean eu leo quam a ni. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a.
A rilru a buai em em a, a rilru a hah em em bawk a. Aenean eu leo quam a ni. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a.
A rilru a buai em em a, a rilru a hah em em bawk a. Aenean eu leo quam a ni. A rilru a hah lutuk chuan a rilru a buai em em a, a rilru a hah lutuk chuan a rilru a buai em em bawk a.
Popover anga tarlan markup engmah hi JavaScript leh data
attribute chhunga content atanga siam a ni lo.
JavaScript hmangin popovers te chu enable rawh:
- $ ( '#entirna' ). popover ( duhthlan tur ) .
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-animation=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
animation tih a ni | boolean a ni | dik | tooltip ah css fade transition hmangin apply rawh |
html tih a ni | boolean a ni | diklo | Popover ah chuan html dah la. False a nih chuan jquery’s text method hmangin dom chhungah content kan dah ang. XSS attack i ngaihtuah chuan text hmang rawh. |
dahna tur hmun a ni | string | thiltih | 'dik' | popover dah dan tur - top | hnuai lam | veilam | dik |
selector a ni | hrui | diklo | selector pek a nih chuan tooltip object te chu target tarlan te hnenah delegate a ni ang |
ti per | hrui | 'click' a ti a. | popover a tihchhuah dan - | hover rawh | focus | kuta thawh |
nihna | string | thiltih | '' tih a ni. | `title` attribute a awm loh chuan default title value a ni |
lungawi | string | thiltih | '' tih a ni. | `data-content` attribute a awm loh chuan default content value a ni |
titlai | number | thil | 0 a ni | popover (ms) lantir leh thup delay - manual trigger type-ah a hman loh Number supply a nih chuan hide/show pahnih ah delay a awm vek a ni Thil awm dan tur chu: |
container a ni | string | diklo | diklo | Popover chu element bik pakhatah a append thin |
Performance avang hian Tooltip leh Popover data-apis te hi opt in a ni a, i hman duh chuan selector option kha tarlang mai rawh.
Element collection pakhat atan popovers a initialize thin.
A elements popover a rawn pholang.
- $ ( '#element' tih chu a ni). popover ( 'tihlan rawh' ) .
A elements popover a thup a.
- $ ( '#element' tih chu a ni). popover ( ‘thup’ ) tih a ni.
A elements popover a tidanglam.
- $ ( '#element' tih chu a ni). popover ( 'toggle' tih hi a dik lo a ni.
Element pakhat popover chu a thup a, a tichhe vek bawk.
- $ ( '#element' tih chu a ni). popover ( ‘tihchhiat’ ) .
He plugin hmang hian alert message zawng zawngah dismiss functionality add vek ang che.
Hei leh chu thlak la, ti leh rawh. A rilru a buai em em a, a rilru a hah em em bawk a, a rilru a buai em em bawk a, a rilru a hah em em bawk a, a rilru a hah em em bawk a. A rilru a buai em em a, a rilru a hah em em bawk a.
JavaScript hmanga alert dismissal theihna tur:
- $ ( ".alert" tih a ni. hriattirna () .
I close button ah khan add mai la data-dismiss="alert"
, automatic in alert close functionality a pe ang.
- <a class = "khar" data-dismiss = "alert" href = "#" > × </a> tih a ni
Alert zawng zawng chu close functionality nen a wrap vek. I alerts te kha khar a nih hunah animate out theih nan, an chungah the .fade
and .in
class apply tawh an neih ngei ngei tur a ni.
Alert a khar thin.
- $ ( ".alert" tih a ni. alert ( 'khar' ) .
Bootstrap-a alert class hian alert functionality-a hook theihna tur thil thleng tlemte a pholang a ni.
Hunbik | Hrilhfiahna |
---|---|
khar | close He event hi instance method kan koh chuan a fire nghal vek a ni. |
khar a ni | He event hi alert khar a nih hunah fire a ni (css transitions zawh hun a nghak ang). |
- $ ( '#ka-alert' ). bind ( 'khar' , function () { 1000 a ni.
- // thil engemaw ti rawh...
- }) tih a ni.
Accordion leh navigation ang chi collapsible component hrang hrangte tan base style leh flexible support dawng rawh.
* Transitions plugin a tel tur a ni.
Collapse plugin hmangin accordion style widget awlsam tak kan siam a:
- <div class = "accordion" id = "accordion2" > tih hi a awmzia a awm lo
- <div class = "accordion-pawh" > tih a ni
- <div class = "accordion-a thupui" >
- <a class = "accordion-toggle" data-toggle = "a tlakbuak" data-parent = "#accordion2" href = "#collapseOne" >
- Collapsible Group Item #1. A chhuahna tur hmun leh a hmanna tur hmun
- </a> tih a ni
- </div> tih a ni
- <div id = "collapseOne" class = "accordion- taksa a tlakbuak" >
- <div class = "accordion-a chhunga awm" >
- Anim pariatur tih hi a dik lo a ni.
- </div> tih a ni
- </div> tih a ni
- </div> tih a ni
- <div class = "accordion-pawh" > tih a ni
- <div class = "accordion-a thupui" >
- <a class = "accordion-toggle" data-toggle = "a tlakbuak" data-parent = "#accordion2" href = "#collapseTwo" >
- Collapsible Group Item #2. A chhuahna tur hmun leh a hmanna tur hmun
- </a> tih a ni
- </div> tih a ni
- <div id = "collapseTwo" class = "accordion-taksa tlakchhiatna" >
- <div class = "accordion-a chhunga awm" >
- Anim pariatur tih hi a dik lo a ni.
- </div> tih a ni
- </div> tih a ni
- </div> tih a ni
- </div> tih a ni
- ...
Accordion markup tel lovin plugin hi i hmang thei bawk. Element dang expanding leh collapsing chu button pakhat toggle turin siam rawh.
- <button type = "button" class = "btn btn-hlauhawm" data-toggle = "a tlakchhiat" data-target = "#demo" >
- simple collapsible a ni
- </button> tih a ni
- <div id = "demo" class = "a tlakbuak" > ... </div>
Add data-toggle="collapse"
leh a data-target
to element mai mai chuan collapsible element control chu automatic in a assign thei ang. Attribute hian data-target
collapse apply tur css selector a pawm a. collapse
Collapsible element ah hian class chu add ngei ngei tur a ni. Default open i duh chuan additional class kha add la in
.
Collapsible control-a accordion ang chi group management dah belh tur chuan data attribute data-parent="#selector"
. Hei hi action-a hmuh theih nan demo en rawh.
Manual hmangin enable theih a ni:
- $ ( ".a tlakbuak" ). a tlakbuak () .
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-parent=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
nu leh pa | selector a ni | diklo | Selector a nih chuan he collapsible item hi a lan hunah parent tarlan hnuaia collapsible element zawng zawng chu khar vek a ni ang. (acordion tih dan phung pangngai ang chiah) |
toggle a ni | boolean a ni | dik | Invocation-ah collapsible element a toggle thin |
I content chu collapsible element angin a activate thin. A pawm a, optional options a awm object
bawk .
- $ ( '#kaCollapsible' ). a tlakbuak ({
- toggle : dik lo
- }) tih a ni.
Collapsible element chu show emaw hidden emaw ah a toggle thin.
Collapsible element a lantir.
Collapsible element a thup thei.
Bootstrap-a collapse class hian collapse functionality-a hook theihna tur event tlemte a pholang a ni.
Hunbik | Hrilhfiahna |
---|---|
lantir | show He event hi instance method kan koh chuan a fire nghal vek a ni. |
tih a ni | He event hi collapse element pakhat user hmuh theiha siam a nih chuan fire a ni (css transitions zawh hun a nghak ang). |
biru | hide He event hi method koh a nih chuan a fire nghal a ni. |
thuhruk | He event hi user hnen atanga collapse element thup a nih chuan a fire thin (css transitions zawh hun a nghak ang). |
- $ ( '#kaCollapsible' ). on ( 'thup' , hnathawh () { .
- // thil engemaw ti rawh...
- }) tih a ni.
A hnuaia slideshow hian carousel ang chi element hrang hrang cycle theihna tur generic plugin leh component a tarlang a.
- <div id = "ka Carousel" class = "carousel slide" > A chhuahna tur hmun leh a hmanna tur hmun chu a in ang lo hle
- <ol class = "carousel-a chhinchhiahna te" >
- <li data-target = "#myCarousel" data-slide-to = "0" class = "active" ></li>
- <li data-target = "#ka Carousel" data-slide-to = "1" ></li> tih hi a ni
- <li data-target = "#ka Carousel" data-slide-to = "2" ></li> tih hi a ni
- </ol> tih a ni
- <!-- Carousel thil chi hrang hrang -->
- <div class = "carousel-a chhunga awm" >
- <div class = "item active" > ... </div> tih a ni
- <div class = "item" > ... </div> tih hi a ni
- <div class = "item" > ... </div> tih hi a ni
- </div> tih a ni
- <!-- Carousel nav --> tih a ni
- <a class = "carousel-control a awm tawh" href = "#ka Carousel" data-slide = "a hmaa" > ‹ </a> tih a ni
- <a class = "carousel-control dikna" href = "#ka Carousel" data-slide = "a dawt leh tur" > › </a> tih a ni
- </div> tih a ni
Data attribute hmangin awlsam takin carousel awmna tur control rawh. data-slide
keywords prev
or next
, chu a pawm a, chu chuan slide awmna chu a awmna hmun nen khaikhin chuan a thlak danglam thin. A dang pawhin, data-slide-to
raw slide index chu carousel-ah pass turin hmang la data-slide-to="2"
, chu chu slide awmna hmun chu index bik pakhata intan a 0
ni.
Carousel chu manual-in call la, hetiang hian:
- $ ( '.carousel' tih a ni. carousel () a ni.
Options chu data attribute emaw JavaScriptz hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-interval=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
inkar a ni | a zat | 5000 a ni | Item pakhat automatic-a cycle-a tihkhawtlai hun chhung. Dik lo a nih chuan carousel hian automatic in a cycle dawn lo. |
chawl | hrui | "hover" tih a ni. | Mouseenter-a carousel cycling chu a titawp a, mouseleave-a carousel cycling chu a chhunzawm leh ta a ni. |
Carousel chu optional options hmangin a initialize a, object
item hrang hrang hmangin cycle a kal tan thin.
- $ ( '.carousel' tih a ni. carousel ({ 1) a ni.
- hun chhung : 2000 a ni
- }) tih a ni.
Carousel thilte chu veilam atanga dinglam thlengin a cycle a.
Carousel chu thil kal tlanga cycle a kal theih loh nan a titawp.
Carousel chu frame pakhatah a cycle (0 based, array ang chi).
Item hmasa lam chu a cycle a.
Item dang lam pan chuan a cycle a.
Bootstrap-a carousel class hian carousel functionality-a hooking-na tur event pahnih a pholang a ni.
Hunbik | Hrilhfiahna |
---|---|
tleng | He event hi slide instance method invoke a nih chuan a fire nghal vek a ni. |
a rawn hrual a | He event hi carousel-in a slide transition a zawh hunah a kah chhuak thin. |
Eng form text input pawha elegant typeaheads rang taka siam theihna tur plugin bulpui, awlsam taka tihzauh theih.
- <input type = "text" data-provide = "type hmahruaitu" >
autocomplete="off"
Bootstrap typeahead dropdown-a default browser menu a lan loh nan set i duh ang .
A chunga entirnan kan hmuh ang hian typeahead functionality nei element register turin data attribute te dah belh rawh.
Typeahead chu manual in ko rawh:
- $ ( '.type hmasa ber' ). type hmasa ber () .
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-source=""
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
bultanna | array, hnathawh dan | [ ] a ni. | Data source chu zawhna zawh tur a ni. String array emaw function emaw pawh a ni thei. Function hian argument pahnih a pass a, chu query chu input field-a value leh process callback a ni. process Function chu callback-a single argument hmangin data source chu direct-a emaw, asynchronous-a emaw return-in synchronous-in hman theih a ni. |
thil | a zat | 8. A ni | Dropdown-a thil lang tur max zat. |
minLength a ni | a zat | 1. a ni | Autocomplete rawtna trigger hmaa character sei ber mamawh zat |
matcher a ni | thiltih | case insensitive lo tak a ni | Query pakhat chu item nen a inmil em tih hriat theihna tur method. Argument pakhat a pawm a, chu item chu zawhna test tur a ni. Tuna zawhna awm mek chu this.query . true Query a inmil chuan boolean a rawn pe leh ang. |
sorter a ni | thiltih | inmil tak, case sensitive, case insensitive lo |
Autocomplete result sort dan tur hman dan. Argument pakhat a pawm a, items typeahead instance scope a nei bawk. Tuna zawhna awm mek chu this.query . |
updater a ni | thiltih | item thlan tawh chu a rawn pe kir leh thin | Item thlan tawh rawn thawn let lehna atana hman dan. Argument pakhat a pawm a, the item and hian typeahead instance scope a nei a. |
highlighter a ni | thiltih | default match zawng zawng a highlight vek | Autocomplete result tarlanna atana hman dan. Argument pakhat a pawm a, item typeahead instance scope a nei bawk. html a rawn kir leh tur a ni. |
Input pakhat chu typeahead hmangin a initialize thin.
A veilam a subnavigation hi affix plugin live demo a ni.
data-spy="affix"
Element eng pawha awlsam taka affix behavior dah tur chuan i spy duh element ah khan add mai tur a ni. Tichuan offset hmangin element pakhat pinning on leh off hun tur chu define rawh.
- A rilru a buai em em a, a rilru a hah em em bawk a, a rilru a buai em em bawk a, a rilru a hah em em bawk a . > ... < / div >
affix
,
affix-top
, leh
affix-bottom
. Affix kick in hian page-a normal flow atanga content a paih chhuah avangin nu leh pa tlakchhiat theihna tur check thin tur a ni tih hre reng ang che.
JavaScript hmangin affix plugin chu call rawh:
- $ ( '#navbar' tih chu a ni). affix () tih a ni.
Options chu data attribute emaw JavaScript hmangin pass theih a ni. Data attribute atan chuan option hming chu , ah hian append la data-
, data-offset-top="200"
.
Hming | lampang | hlawhchhamna | hrilhfiahna |
---|---|---|---|
offset a ni | number | hnathawh | thil | 10 a ni | Scroll awmna tur chhiar hunah screen atanga offset tur pixels te. Number pakhat pek a nih chuan offset chu a chung leh vei lamah a hmang ang. Direction pakhat, a nih loh leh unique offset tam tak ngaihthlak tur chuan object pakhat pe mai offset: { x: 10 } rawh . Offset dynamically pek i mamawh hunah function hmang la (responsive design thenkhat tan a tangkai). |