Jquery: Class selector example

HTML Code:

<script src="MainScript.js"></script>
<input type="hidden" name="ZONEFILE" value="'.$filename.'">
				<button type="submit" name="EDIT_ZONE" class="btn btn-primary"/>View Stats</button>
				<a class="btn LiveStatsBtn"><span class="btn-label">Get Stats now</span> </a>

The class LiveStatsBtn is selected at runtime, and the element modified, so that a click event is added to it, as follows:

$(document).ready (function()
		alert("You clicked me!"); 

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.