大佬教程收集整理的这篇文章主要介绍了angularjs – 如何通过单击按钮隐藏div?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<ion-content ng-controller="StartpageCtrl"> <div class="list card" id="startCard" ng-show="showstartCard"> <div class="item item-image item item-text-wrap"> Card 1 </div> </div> <div class="list card" id="secondCard" ng-show="showsecondCard"> <div class="item item-image item item-text-wrap"> Card 2 </div> </div> <button ng-click="hideCard()" class="button button-full button-calm button icon-right ion-chevron-right"> Start Now </button> </ion-content>@H_262_8@controllers.js @H_262_8@
.controller("StartpageCtrl",funcion($scopE){ $scope.showstartCard = true; $scope.showsecondCard = false; $scope.hideCard = function() { $scope.showstartCard = false; $scope.showsecondCard = true; }; });@H_262_8@当我运行页面时,我看到“卡2”,当我点击按钮时没有任何反应.
Using angular: HTML file: <td><a href="#" ng-click="showDetails =! showDetails">source Doc..</a> <div id="mydiv" ng-show="showDetails"> <div id="mydiv-container"> <div id="mydiv-content"> <a href="#" ng-click="showDetails =! showDetails">Close</a> <br> Hello </div> </div> </div> </td> css file: body { height: 100%; BACkground-color: #F0F0F0; font-family: Arial,sans-serif; } #mydiv { width: 100%; height: 100%; overflow: hidden; left: 100px; top: 150px; position: absolute; opacity: 0.95; } #mydiv-container { margin-left: auto; margin-right: auto; } #mydiv-content { width: 70%; padding: 20px; BACkground-color: white; border: 1px solid #6089F7; } a { color: #5874BF; text-decoration: none; } a:hover { color: #112763; }
以上是大佬教程为你收集整理的angularjs – 如何通过单击按钮隐藏div?全部内容,希望文章能够帮你解决angularjs – 如何通过单击按钮隐藏div?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。