Bootstrap Alert Js

1151   18 November 2019

Bootstrap alert  js is built using bootstarp and jquery and there is no any extra html markup and styles it is totally built using bootstrap modal component.

To Initiate Bootstrap Alert

$(document).ready(function(){
	adpAlert(element,option);
}
// Custom Body
adpAlert('.customBody',{
        body:$('body').html(),
        modalSize:'lg',
        action:[{
            title:'Close',
            btnClass:"btn btn-danger",
            trigger:()=>{
                alert('Hello')
            }
        }],
        closeButton:true
})

Element : (HTML element Object ) Select element using javascript or jquery like document.querySelector('.element'), $('.element') etc

Option: (Obect: optional 

List of All Options

TitleStringTitle of your Modal
iconBoolean

Default: true,

Put true if you want icon in modal header

fontAwesomestringIt takes font-awesome class to show fonts.
closeButtonboolean

Default: false,

If value is true then bootstrap Modal default close button will be shown on the top right of header



BodyString or HTMLAdd anything like text or html elements


View More

Related Elements

  •   3136
  •  0
  •   0
loader