Generate popup (Modal) HTML code
<!--New Task pop-up box -<Divclass= "Modal Fade"ID= "Createprojectmodal"TabIndex= "-1"role= "Dialog"Aria-labelledby= "Createprojectmodallabel"> <Divclass= "Modal-dialog"role= "Document"> <Divclass= "Modal-content"> <formrole= "form"name= "Createprojectform"> <inputtype= "hidden"name= "ProjectID"/> <Divclass= "Modal-header"> <!--pop-up box title - <h4class= "Modal-title">New Task</h4> </Div> <Divclass= "Modal-body">//pop-up box content</Div> <Divclass= "Modal-footer"> <Buttontype= "button"class= "Btn Btn-default"Data-dismiss= "Modal">Shut down</Button> <Buttontype= "button"Data-complete-text= "finished!"AutoComplete= "Off"class= "Btn btn-primary"ID= "Saveprojectbtn">Save</Button> </Div> </form> </Div> </Div></Div>
Modal Event:
function // modal box hidden before calling this method }). On (function// modal box show before calling this method // Settings Dialog title $ (this). Find ('. Modal-title '). Text (' New task '); }) ;// Close the dialog box $ (' #createProjectModal '). Modal (' hide '); // Open the dialog box $ (' #createProjectModal '). Modal (' show ');
Bootstrap Learning (ii)-----modal modal box