53d1d613f022ce5519df8dc0d3296d95e9c9e5da
[platform/framework/web/web-ui-fw.git] / demos / tizen-gray / widgets / checkbox / checkbox.js
1 $( "#checkbox-demo" ).live("pagecreate", function () {
2         $( "#check-1" ).bind('vclick', function () {
3                 console.log("clicked...");
4                 value = $( "#checkbox-1" ).prop( "checked" ); 
5                 // change checkbox property and update UI. 
6                 $( "#checkbox-1" ).prop( "checked", !value );
7                 $("#checkbox-1").checkboxradio( "refresh" );
8                 // show checkbox1 property
9                 $( ".checked-value" ).text( $( "#checkbox-1" ).prop( "checked" ) );
10         });
11
12         $( "#get-check-value" ).bind('vclick', function () {
13                 $( ".checked-value" ).text( $( "#checkbox-1" ).prop( "checked" ) );
14         });
15
16         $("input[type='checkbox']").bind( "change", function(event, ui) {
17                 $( ".triggered-check" ).text( this.id + " is " + this.checked );
18         });
19
20 });
21
22