All pastes #805467 Raw Edit

checkbox jquery

public html v1 · immutable
·published 2007-12-04 11:38 UTC
rendered paste body
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">  <head>	<script type='text/javascript' src="res/js/<b style="color:black;background-color:#a0ffff">jquery</b>.js"></script>	<script type='text/javascript'><!--	function init() {	$("#check").click(function(event) {		log('checked attr =' + $(this).attr('checked'));	});	$('#button').click(function() {		$('#check').click();	});}function log(text) {	$("#log").append("<div>" + text +"</div>");}$(init);	// 	--></script>  </head>  <body>  	<label><input id='check' type='<b style="color:black;background-color:#ffff66">checkbox</b>' name="plop"/>Test <b style="color:black;background-color:#ffff66">checkbox</b></label>  	<input type='button' value='check the box' id='button'/>  	<div id='log'></div>  </body></html>