Popular Posts
android.intent.action.SCREEN_ON & android.intent.action.SCREEN_OFF First, I've tried create a receiver to receive screen on/off and register receiver on AndroidManifest.xml like below, but unfortunately ... runas RUNAS 使用方法: RUNAS [ [/noprofile | /profile] [/env] [/netonly] ] /user: program RUNAS [ [/noprofile | /profile] [/env] [/netonly] ... Diff Time DateTime from = new DateTime(2011, 1, 7); DateTime to = DateTime.Now; TimeSpan ts = to - from; Console.WriteLine("start time : {0:yyyy...
Stats
jQuery delegate
<html>
<head>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
    $(function(){
        // add row button
        $('.append_button').click(function(){
            var row = $('<div class="lister">'+new Date()+'&nbsp;&nbsp;&nbsp;<input type="button" class="row_button" value="click me!" /></div>');
            row.appendTo('.container');
        });
        
        // delegate for append button
        $('.container').delegate('.lister input:button', 'click', function(){
            alert('delegate ok!');
        });
        // delegate for append button (falied, because .lister was not found on delegate action)
        $('.container .lister').delegate('input:button', 'click', function(){
            alert('delegate, again!');
        });
    });
</script>
</head>
<body>
<div class="container">
    <input type="button" class="append_button" value="Add" />
</div>
</body>
</html>