mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
Modal uses Tap now
This commit is contained in:
@ -35,20 +35,22 @@
|
|||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script src="../dist/ionic.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var open = document.getElementById('modal-opener');
|
var open = document.getElementById('modal-opener');
|
||||||
open.addEventListener('click', function(e) {
|
|
||||||
|
ionic.on('tap', function(e) {
|
||||||
var modal = document.getElementById('modal');
|
var modal = document.getElementById('modal');
|
||||||
modal.classList.add('active');
|
modal.classList.add('active');
|
||||||
return false;
|
return false;
|
||||||
});
|
}, open);
|
||||||
|
|
||||||
var closer = document.getElementById('modal-closer');
|
var closer = document.getElementById('modal-closer');
|
||||||
closer.addEventListener('click', function(e) {
|
ionic.on('tap', function(e) {
|
||||||
var modal = document.getElementById('modal');
|
var modal = document.getElementById('modal');
|
||||||
modal.classList.remove('active');
|
modal.classList.remove('active');
|
||||||
return false;
|
return false;
|
||||||
});
|
}, closer);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user