User thiltih dan tlangpui atan contextual feedback message pe la, alert message awm thei leh inthlak danglam thei tlemte nen pe rawh.
Entirna te
Text sei zawng zawng tan alerts a awm a, chubakah optional dismiss button pawh a awm bawk. Styling dik tak atan chuan contextual class mamawh pariat zinga pakhat hmang la (eg, .alert-success). Inline dismissal atan chuan alerts jQuery plugin hmang la .
Primary alert awlsam tak—en ve teh!
Secondary alert awlsam tak—en ve teh!
Hlawhtlinna hriattirna awlsam tak—en ve teh!
Hlauhawm hriattîrna awlsam tak—en ve teh!
Vaukhânna alert awlsam tak—en ve teh!
Info alert awlsam tak—en ve teh!
Light alert awlsam tak—en ve teh!
Dark alert awlsam tak—en ve teh!
Assistive technology-te hnena awmzia thlentu
awmzia belhchhah nan color hman hian hmuh theiha hriattirna chauh a pe a, chu chu assistive technology hmangtute hnenah a thlen dawn lo – screen reader ang chi te. Color hmanga tarlan information chu a thupui a\ang ngeia lang (entir nan, hmuh theih thuziak), a nih loh leh kawng dang hmanga telh a nih theih nan enfiah rawh, chu chu .sr-onlyclass nena thup belh thuziak ang chi a ni.
Link rawng a ni
.alert-linkAlert eng pawh chhungah rang taka matching colored links pe turin utility class hmang ang che .
Primary alert awlsam tak leh
entirnan link . I duh chuan click khat pe rawh.
Secondary alert awlsam tak leh
entirnan link . I duh chuan click khat pe rawh.
Hlawhtlinna alert awlsam tak leh
entirnan link . I duh chuan click khat pe rawh.
Hlauhawm hriattirna awlsam tak leh
entirnan link . I duh chuan click khat pe rawh.
Warning alert awlsam tak leh
entirnan link . I duh chuan click khat pe rawh.
Info alert awlsam tak leh
entirnan link . I duh chuan click khat pe rawh.
Light alert awlsam tak leh
entirnan link . I duh chuan click khat pe rawh.
Dark alert awlsam tak leh
entirnan link . I duh chuan click khat pe rawh.
Thu belhchian dawl lo
Alert-ah hian HTML element dang heading, paragraph leh divider te pawh a awm thei bawk.
I ti tha e!
Aww yeah, he alert message pawimawh tak hi hlawhtling takin i chhiar a ni. He example text hi a rei deuh dawn a, chutiang chuan alert chhunga spacing hian hetiang content hi a thawh dan i hmu thei ang.
I mamawh hun apiangah thil tha leh felfai taka awm theih nan margin utilities hmang ngei ang che.
Dismis a ni
Alert JavaScript plugin hmang hian inline-a alert eng pawh dismiss theih a ni. Hetah hian engtin nge ni ang:
Alert plugin kha i load tawh ngei ang che, a nih loh leh Bootstrap JavaScript compile kha i load tawh ngei ang.
Kan JavaScript hi source atanga i siam a nih chuanutil.js . Compiled version ah hian hei hi a tel a ni.
Dismiss button leh .alert-dismissibleclass te dah la, chu chuan alert dinglamah extra padding a dah belh a, .closebutton chu a dah bawk.
Dismiss button ah chuan data-dismiss="alert"attribute chu add la, chu chuan JavaScript functionality a tichhuak ang. <button>Device zawng zawnga nungchang dik tak neih theih nan element nen hmang ngei ang che .
Dismissing hunah alerts animate tur chuan .fadeand .showclass te kha add ngei ang che.
Hei hi live demo hmangin action-ah i hmu thei ang:
Guacamole thianghlim tak! A hnuaia field thenkhat chu i check in tur a ni.
JavaScript tih dan tur
Triggers te a awm
JavaScript hmanga alert dismissal theihna tur:
A nih loh leh alert chhungadata button pakhata attribute awmte nen , a chunga kan hmuh ang khan:
Alert khar chuan DOM atangin a paih chhuak ang tih hre reng ang che.
Thiltih dan tur
Tihdan
Hrilhfiahna
$().alert()
data-dismiss="alert"Attribute nei descendant element-a click event awmte chu alert ngaithla turin a siam . (Data-api-a auto-initialization hman hunah a ngai lo.)
$().alert('close')
DOM atanga alert lakchhuah hmangin a khar thin. Element -ah hian .fadeand .showclass a awm chuan alert chu a paih hmain a fade out ang.
$().alert('dispose')
Element pakhat alert a tichhia.
Thil thlengte
Bootstrap-a alert plugin hian alert functionality-a hook theihna tur thil thleng tlemte a pholang a ni.
Hunbik
Hrilhfiahna
close.bs.alert
closeHe event hi instance method kan koh chuan a fire nghal vek a ni.
closed.bs.alert
He event hi alert khar a nih hunah fire a ni (CSS transition zawh hun a nghak ang).