Select all checkboxes in yii

Below is the code I am trying to use to select all my checkboxes which is not working




<script type="text/javascript">

		$(document).ready(function()

		{

			$("#t_all").click(function()				

			{

				var checked_status = this.checked;

				$("input[@name=Details[abc_t][]]").each(function()

				{

					this.checked = checked_status;

				});

			});					

		});

		

		</script>




<input type="checkbox" id="t_all">Select All<br>





In My browser firebug is showing all my checkboxes as name="Details[abc_t][]"




How can I get them checked

Any Ideas?

at first, you set this,

var checked_status = this.checked;

then in the each() function, you set this,

this.checked = checked_status;

so, it will go as this.checked = this.checked.

the status wont change.