~smagoun/whoopsie/whoopsie-lp1017637

« back to all changes in this revision

Viewing changes to backend/stats/static/js/yui/tests/transition/tests/manual/transition-native.html

  • Committer: Evan Dandrea
  • Date: 2012-05-09 05:53:45 UTC
  • Revision ID: evan.dandrea@canonical.com-20120509055345-z2j41tmcbf4as5uf
The backend now lives in lp:daisy and the website (errors.ubuntu.com) now lives in lp:errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
 
<html>
3
 
<head> 
4
 
<style> 
5
 
#demo {
6
 
    background:#ccc;
7
 
    width:200px;
8
 
    height:200px;
9
 
    margin-top:200px;
10
 
    overflow: hidden;
11
 
    position:relative;
12
 
    -webkit-transition-property: width, height, top, left, opacity;
13
 
    -webkit-transition-duration: 1s;
14
 
    -moz-transition-property: width, height, top, left, opacity;
15
 
    -moz-transition-duration: 1s;
16
 
}
17
 
</style> 
18
 
 
19
 
</head>
20
 
<body> 
21
 
<div id="demo">this is a demo</div> 
22
 
 
23
 
<script type="text/javascript"> 
24
 
    var node = document.getElementById('demo'),
25
 
        computed = getComputedStyle(node, ''); 
26
 
 
27
 
    console.log(computed['MozTransitionProperty']);
28
 
    node.addEventListener('webkitTransitionEnd', function(e) {
29
 
        console.log(e.propertyName);
30
 
        console.log(e.elapsedTime);
31
 
        console.log(node.style[e.propertyName]);
32
 
    }, false);
33
 
 
34
 
    document.onclick = function() {
35
 
        var w = parseFloat(computed.width) + 100;
36
 
        node.style.width = w + 'px'; 
37
 
    };
38
 
 
39
 
</script> 
40
 
</body></html>