How to get the value of a selected radio button using its name in jQuery?

hello guys,

here is simple code for how to get selected radio button using its name in jquery.


dat’s it.!!


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 🙂

jquery datatable simple n effective example

hello guys,

let’s go for very simple DataTables example which is filled by jquery ajax call.

Import bellow file in your html heading section

!!! note :–  just replace &gt; with > (end tag)

<link rel=”stylesheet” type=”text/css” href=””&gt;
<link rel=”stylesheet” type=”text/css” href=””&gt;
<script type=”text/javascript” charset=”utf8″ src=””&gt;

JQuery function

        	type: "GET",
		data: {data: pass ur data},
           	url:  "give your php file url here",
            	contentType: "application/json; charset=utf-8",
            	success: function(data) {
		$('#table').append("<tr><td>YOUR DATA HERE</td></tr>"); 
                   "sScrollY": 200,
                   "bJQueryUI": true,

HTML code for table

<table cellpadding=”0″ cellspacing=”0″ border=”0″ id=”ausgroup” width=”80%”>
<th>Your Heading </th>


some important option listed bellow

“bJQueryUI”: true,       — for UI css of Table
“bPaginate”: false,        — for Pagination
“bLengthChange”: false,
“bFilter”: true,                — for filter
“bSort”: true,                 — for sorting

Redraw Datatable with fresh data

	            type: "GET",
	            url: "your url",
        	    success: function(data) {
		       if (typeof oTablelb != 'undefined') 
		        $('#lbtable').append("<tr><td>your data</td></tr>"); 
                                  "bDestroy": true, 
                                  "sScrollY": 200, 
                                  "bJQueryUI": true, 

just set bellow property

1) if (typeof oTablelb != 'undefined') oTablelb.fnClearTable();

2) "bDestroy": true,

now run your file,  DataTable will reload fresh data based on ajax call.  🙂

hope you like it!!