demos : change live to on
authorKoeun Choi <koeun.choi@samsung.com>
Fri, 8 Mar 2013 07:11:58 +0000 (16:11 +0900)
committerYoumin Ha <youmin.ha@samsung.com>
Fri, 22 Mar 2013 11:19:08 +0000 (20:19 +0900)
Change-Id: I2316ccc092edf16c7462580c593c02e19f914ccb

demos/tizen-winsets/main.js
demos/tizen-winsets/tips/generate-elements-dynamically.js
demos/tizen-winsets/widgets/checkbox/checkbox.js
demos/tizen-winsets/widgets/ctxpopup.js
demos/tizen-winsets/widgets/list/list-edit.js
demos/tizen-winsets/widgets/progressbar.js
demos/tizen-winsets/widgets/radio/radio.js

index 0d238f0..46ecfbd 100644 (file)
@@ -64,7 +64,7 @@ $( document ).bind("pagecreate", function () {
        });
 
        /* Gen list : Dummy DB load */
-       $(".virtuallist_demo_page").live("pagecreate", function () {
+       $( document ).on( "pagecreate", ".virtuallist_demo_page", function () {
                /* ?_=ts code for no cache mechanism */
                $.getScript( "./virtuallist-db-demo.js", function ( data, textStatus ) {
                        $("ul").filter( function () {
@@ -77,7 +77,7 @@ $( document ).bind("pagecreate", function () {
        });
 
        /*Expandable list : Dummy DB load*/
-       $("#genlist_extendable_page").live("pagecreate", function ( el ) {
+       $( document ).on( "pagecreate", "#genlist_extendable_page", function () {
                /*?_=ts code for no cache mechanism*/
                $.getScript( "./virtuallist-db-demo.js", function ( data, textStatus ) {
                        $("ul").filter( function () {
@@ -91,7 +91,7 @@ $( document ).bind("pagecreate", function () {
        });
 
        // Expand all textarea height automatically
-       $('#ButtonNolist').live( "pagecreate", function ( ev ) {
+       $( document ).on( "pagecreate", "#ButtonNolist", function ( ev ) {
                var page = $( ev.target );
                $( page ).bind( 'pageshow' , function ( ) {
                        var textarea = page.find('textarea');
index 415343e..57ba5f9 100644 (file)
@@ -11,11 +11,11 @@ function addCheckbox(){
 }
 
 
-$( '#bAdd' ).live( 'vclick', function () {
+$( document ).on( "vclick", "#bAdd", function () {
        addCheckbox();
 } );
 
-$( "#ButtonAdd" ).live( "vclick", function() {
+$( document ).on( "vclick", "#ButtonAdd", function () {
        /* Append new button */
        var buttonTemplate = "<div data-role='button' data-inline='true' " +
                                                        "data-icon='call' data-style='circle' " +
@@ -26,7 +26,7 @@ $( "#ButtonAdd" ).live( "vclick", function() {
        /*$("#buttonItems").trigger("create");*/
 } );
 
-$( "#ListAdd" ).live( "vclick", function() {
+$( document ).on( "vclick", "#ListAdd", function () {
        var listTemplate = "<li>Appended New Item</li>";
        $( listTemplate ).appendTo( "#listview" );
        $( "#listview" ).listview( "refresh");
index 7a637d4..21277c2 100644 (file)
@@ -1,4 +1,4 @@
-$( "#checkbox-demo" ).live("pagecreate", function () {
+$( document ).on( "pagecreate", "#checkbox-demo", function () {
        $( "#check-1" ).bind('vclick', function () {
                console.log("clicked...");
                value = $( "#checkbox-1" ).prop( "checked" );
index 50aa329..a15f549 100644 (file)
@@ -1,4 +1,4 @@
-$("#pop_js").live("vclick", function ( e ) {
+$( document ).on( "vclick", "#pop_js", function ( e ) {
        if ( $(e.target).is("#ctxpopup_update") ) {
                $("#btn_js").text("Peekaboo!");
                $("#btn_js").buttonMarkup("refresh");
@@ -9,4 +9,4 @@ var popupTest = function()
 {
        $("#pop_text_only").popup("open");
        return false;
-};
\ No newline at end of file
+};
index 372b015..47b2403 100644 (file)
@@ -1,6 +1,6 @@
 var ContactName = "";
 
-$("#genlist-dialog-edit .ui-li-dialogue-edit .ui-btn").live("vclick", function ( e ) {
+$( document ).on( "vclick", "#genlist-dialog-edit .ui-li-dialogue-edit .ui-btn", function ( e ) {
        $(e.target).parents(".ui-btn").siblings("input").val("");
 });
 
@@ -14,4 +14,4 @@ $(document).bind("pagebeforeshow", function ( event , data ) {
        if ( $(event.target).attr("id") == "genlist-dialog-edit" ) {
                $("#genlist-dialog-edit input").eq(4).val(ContactName);
        }
-});
\ No newline at end of file
+});
index fa6016f..89606a0 100644 (file)
@@ -1,6 +1,6 @@
 var progressbar_running;
 
-$("#progressbar-demo").live("pageshow", function ( e ) {
+$( document ).on( "pageshow", "#progressbar-demo", function () {
 
        $("#progressbarTest").bind("vclick", function ( e ) {
                progressbar_running = !progressbar_running;
@@ -66,7 +66,7 @@ $("#progressbar-demo").live("pageshow", function ( e ) {
        });
 });
 
-$("#progressbar-demo").live("pagehide", function ( e ) {
+$( document ).on( "pagehide", "#progressbar-demo", function () {
        progressbar_running = false;
        $("#pending").progress( "running", false );
        $("#progressing").progress( "running", false );
index 2c97312..e0dc361 100644 (file)
@@ -1,4 +1,4 @@
-$( "#radio-demo" ).live("pagecreate", function () {
+$( document ).on( "pagecreate", "#radio-demo", function () {
        $("input[type='radio']").bind( "change", function(event, ui) {
                if( this.checked )
                        $( ".triggered-radio" ).text( this.id + " is selected..." );