Yui: различия между версиями

Содержимое удалено Содержимое добавлено
Нет описания правки
Нет описания правки
Строка 1366:
<h3><span>TreeView (Иерархические деревья)</span></h3>
<source lang="javascript">
'''Движение обьекта по траектории:'''
<source lang="javascript">
<!-- 1 -->
<style type="text/css">
#demo {
background:#ccc;
margin-bottom:1em;
height:30px;
width:30px;
}
</style>
<script type="text/javascript" src="yui/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="yui/build/animation/animation.js"></script>
<!-- 1 -->
 
<!-- 2 -->
<div id="demo"></div>
<button id="demo-run">run</button>
 
<script type="text/javascript">
(function() {
var attributes = {
points: { to: [600, 10], control: [ [300, 100], [800, 800] ] }
};
var anim = new YAHOO.util.Motion('demo', attributes);
 
YAHOO.util.Event.on('demo-run', 'click', function() {
anim.animate();
});
})();
</script>
<!-- 2 -->
</source>