[英]AngularJS change css property value
以下是我的html代碼段:
<div class="pay row-0 col-1 ">
<div class="t-middle f26 f-white row-0 " style="position:absolute;top:50%;">please wait...</div>
</div>
.pay
類的樣式表如下:
.pay, .stopIE {
position: fixed;
background: rgba(0, 0, 0, 0.7);
z-index: 100;
top: 0;
display: none;
}
單擊按鈕后,將執行以下功能。
$scope.goBuy = function(){
Account.buyNow({"pid": $scope.buypp.id})
.then(function(response){
[change the .pay class display to block]
$window.location.href = response.data;
})
.catch(function(response){
})
}
在等待響應時,如何將.pay
類的display
屬性值從none
更改為block
。 謝謝!!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.