Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #74 from linlingyu/dev

[BugFix] 修复demo不符合规范的地方
  • Loading branch information...
commit 1f9b991278257390b4c846418963e6b079676f6f 2 parents f47de2e + dbd536e
百度FE authored
23 demos/magic.Slider/render/render-htl.html
View
@@ -4,8 +4,9 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8;">
<meta name="description" content="Slider组件 render模式 水平示例" />
<title>Slider组件 render模式 水平示例</title>
+ <link rel="stylesheet" type="text/css" href="../../../resources/default/common/common.css"/>
<link rel="stylesheet" href="../../../resources/default/magic.control.Slider/magic.Slider.css"/>
- <script src="../../../src/import.php?f=magic.Slider,magic.setup.slider,magic.control.slider.$fx,magic.control.slider.$cache" type="text/javascript"></script>
+ <script src="../../../src/import.php?f=baidu.dom.ready,magic.Slider,magic.control.slider.$fx,magic.control.slider.$cache" type="text/javascript"></script>
<style type="text/css">
.view{margin:20px 20px 10px;width:60%;}
.wrap{margin:10px auto;font-size:12px;}
@@ -34,16 +35,18 @@
</div>
</div>
<script type="text/javascript">
- var s1 = new magic.Slider({orientation:'horizonal', direction:'forward', fx:{enable: false}, cache:{enable:true}});
+ baidu.dom.ready(function(){
+ var s1 = new magic.Slider({orientation:'horizonal', direction:'forward', fx:{enable: false}, cache:{enable:true}});
- var s2 = new magic.Slider({accuracy:0.25, orientation:'horizonal', direction:'backward', fx:{enable: false}, cache:{enable:true}});
-
- s1.render('s1');
- s2.render('s2');
-
- s1.setCache(0.5);
- s1.setRange(0.5);
- s2.setCache(1);
+ var s2 = new magic.Slider({accuracy:0.25, orientation:'horizonal', direction:'backward', fx:{enable: false}, cache:{enable:true}});
+
+ s1.render('s1');
+ s2.render('s2');
+
+ s1.setCache(0.5);
+ s1.setRange(0.5);
+ s2.setCache(1);
+ });
</script>
</body>
24 demos/magic.Slider/render/render-vtl.html
View
@@ -4,8 +4,9 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8;">
<meta name="description" content="Slider组件 render模式 竖直示例" />
<title>Slider组件 render模式 竖直示例</title>
+ <link rel="stylesheet" type="text/css" href="../../../resources/default/common/common.css"/>
<link rel="stylesheet" href="../../../resources/default/magic.control.Slider/magic.Slider.css"/>
- <script src="../../../src/import.php?f=magic.Slider,magic.setup.slider,magic.control.slider.$fx,magic.control.slider.$cache" type="text/javascript"></script>
+ <script src="../../../src/import.php?f=baidu.dom.ready,magic.Slider,magic.control.slider.$fx,magic.control.slider.$cache" type="text/javascript"></script>
<style type="text/css">
html, body{height:100%;}
.view{margin:20px 20px 10px;width:200px;height:50%;float:left;}
@@ -36,16 +37,19 @@
</div>
<script type="text/javascript">
- var s1 = new magic.Slider({orientation:'vertical', direction:'forward', fx:{enable: false}, cache:{enable:true}});
+ baidu.dom.ready(function(){
+ var s1 = new magic.Slider({orientation:'vertical', direction:'forward', fx:{enable: false}, cache:{enable:true}});
- var s2 = new magic.Slider({accuracy:0.25, orientation:'vertical', direction:'backward', fx:{enable: false}, cache:{enable:true}});
-
- s1.render('s1');
- s2.render('s2');
-
- s1.setCache(0.5);
- s1.setRange(0.5);
- s2.setCache(1);
+ var s2 = new magic.Slider({accuracy:0.25, orientation:'vertical', direction:'backward', fx:{enable: false}, cache:{enable:true}});
+
+ s1.render('s1');
+ s2.render('s2');
+
+ s1.setCache(0.5);
+ s1.setRange(0.5);
+ s2.setCache(1);
+ });
+
</script>
</body>
18 demos/magic.Slider/setup/setup-htl.html
View
@@ -4,8 +4,9 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8;">
<meta name="description" content="Slider组件 setup模式 水平示例" />
<title>Slider组件 setup模式 水平示例</title>
+ <link rel="stylesheet" type="text/css" href="../../../resources/default/common/common.css"/>
<link rel="stylesheet" href="../../../resources/default/magic.control.Slider/magic.Slider.css"/>
- <script src="../../../src/import.php?f=magic.Slider,magic.setup.slider,magic.control.slider.$fx,magic.control.slider.$cache" type="text/javascript"></script>
+ <script src="../../../src/import.php?f=baidu.dom.ready,magic.Slider,magic.setup.slider,magic.control.slider.$fx,magic.control.slider.$cache" type="text/javascript"></script>
<style type="text/css">
.view{margin:20px 20px 10px;width:60%;}
.wrap{margin:10px auto;font-size:12px;}
@@ -53,13 +54,16 @@
</div>
<script type="text/javascript">
- var s1 = magic.setup.slider('s1', {orientation: 'horizonal', direction: 'forward', fx:{enable: false}, cache:{enable:true}});
+ baidu.dom.ready(function(){
+ var s1 = magic.setup.slider('s1', {orientation: 'horizonal', direction: 'forward', fx:{enable: false}, cache:{enable:true}});
- var s2 = magic.setup.slider('s2', {orientation: 'horizonal', direction: 'backward', fx:{enable: false}, cache:{enable:true}});
-
- s1.setCache(0.5);
- s1.setRange(0.5);
- s2.setCache(1);
+ var s2 = magic.setup.slider('s2', {orientation: 'horizonal', direction: 'backward', fx:{enable: false}, cache:{enable:true}});
+
+ s1.setCache(0.5);
+ s1.setRange(0.5);
+ s2.setCache(1);
+ });
+
</script>
</body>
33 demos/magic.Slider/setup/setup-vtl.html
View
@@ -4,8 +4,9 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8;">
<meta name="description" content="Slider组件 setup模式 竖直示例" />
<title>Slider组件 setup模式 竖直示例</title>
+ <link rel="stylesheet" type="text/css" href="../../../resources/default/common/common.css"/>
<link rel="stylesheet" href="../../../resources/default/magic.control.Slider/magic.Slider.css"/>
- <script src="../../../src/import.php?f=magic.Slider,magic.setup.slider,magic.control.slider.$fx,magic.control.slider.$cache" type="text/javascript"></script>
+ <script src="../../../src/import.php?f=baidu.dom.ready,magic.Slider,magic.setup.slider,magic.control.slider.$fx,magic.control.slider.$cache" type="text/javascript"></script>
<style type="text/css">
html, body{height:100%;}
.view{margin:20px 20px 10px;width:200px;height:50%;float:left;}
@@ -54,20 +55,22 @@
</div>
<script type="text/javascript">
- var s1 = magic.setup.slider('s1', {orientation: 'vertical', direction: 'forward', fx:{enable: false}, cache:{enable:true},
- onchange:function(v){
-
- }});
-
- var s2 = magic.setup.slider('s2', {accuracy: 0, orientation: 'vertical', direction: 'backward', fx:{enable: false}, cache:{enable:true},
- onchange:function(v){
-
- }});
-
- s1.setCache(0.5);
- s1.setRange(0.5);
- s2.setCache(1);
- s2.setValue(0.5);
+ baidu.dom.ready(function(){
+ var s1 = magic.setup.slider('s1', {orientation: 'vertical', direction: 'forward', fx:{enable: false}, cache:{enable:true},
+ onchange:function(v){
+
+ }});
+
+ var s2 = magic.setup.slider('s2', {accuracy: 0, orientation: 'vertical', direction: 'backward', fx:{enable: false}, cache:{enable:true},
+ onchange:function(v){
+
+ }});
+
+ s1.setCache(0.5);
+ s1.setRange(0.5);
+ s2.setCache(1);
+ s2.setValue(0.5);
+ });
</script>
</body>
Please sign in to comment.
Something went wrong with that request. Please try again.