mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
toggle testing
This commit is contained in:
@ -31,7 +31,7 @@
|
|||||||
<li class="list-item">
|
<li class="list-item">
|
||||||
Do Not Disturb
|
Do Not Disturb
|
||||||
<label class="toggle">
|
<label class="toggle">
|
||||||
<input type="checkbox" name="doNotDistrube" checked="checked">
|
<input type="checkbox" name="doNotDisturb" checked="checked">
|
||||||
<div class="slide">
|
<div class="slide">
|
||||||
<div class="switch"></div>
|
<div class="switch"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -39,10 +39,47 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p><a class="button button-secondary" href="index.html">Homepage</a></p>
|
<div class="inset">
|
||||||
|
<p>
|
||||||
|
<button id="btnTest1">Toggle Airplane Mode</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<button id="btnTest2">Toggle Do Not Disturb</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p><a class="button button-secondary" href="index.html">Homepage</a></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- for testing only -->
|
||||||
|
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$("#btnTest1").click(function(){
|
||||||
|
var toggle = $("[name='airplaneMode']")
|
||||||
|
if( toggle.prop("checked") ) {
|
||||||
|
toggle.prop("checked", false);
|
||||||
|
} else {
|
||||||
|
toggle.prop("checked", true);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#btnTest2").click(function(){
|
||||||
|
var toggle = $("[name='doNotDisturb']")
|
||||||
|
if( toggle.prop("checked") ) {
|
||||||
|
toggle.prop("checked", false);
|
||||||
|
} else {
|
||||||
|
toggle.prop("checked", true);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user