Dealing with bootstrap alert

hello guys,

I got some problem while dealing with bootstrap alert.

How to show bootstrap alert div again

when we close alert div box, then if again we can’t show that div box. even if we write jquery show() function.


checkout  <a> tag there you got data-dismiss=”alert” , this will remove div from dom so that’s why we can’t show that div again. so just remove that and bind your function to that div


<a id=”lieclose” onclick=”general_close(”>×</a>

jquery code:

function general_close(id)
	var current_id = "#"+id;

above function will work for any alert div. just change your id in a tag.

How to redraw bootstrap-error message

$('#loginerrbox').append("Please enter valid credentials. 
<a id='crdlogerr' class='close' onclick='general_close('>×</a>");					

above code demonstrate how to redraw new error message on alert div.

hope you like above Tips 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s