0
這是模式彈出我希望當用戶選擇上的一個按鈕,他沒有登錄顯示。如何顯示模式,而不是警告
從我的javascript函數我叫它如下:
function addToWishlistFun(tourid) {
if (document.getElementById("wishlist" + tourid).value == "added")
{
$.post('@Url.Action("RemoveFromWishlist", "Home")', { id: tourid }, function (data) {
if (data) {
var elementid = "wishlist" + tourid;
document.getElementById(elementid).innerHTML = "Add to wishlist" + "<i class=\"fa fa-heart-o\"></i>";
document.getElementById(elementid).value = "notadded";
}
else {
//$("#testPopup").toggle();
document.getElementById("#must-be-logged-in")
// alert("Tour could not be removed from wishlist. Please make sure that you are logged in.");
}
});
}
但是,當按鈕被點擊時,沒有任何顯示。
嘗試過,但仍然沒有運氣 – Techworld
嘗試$( '#必須待登錄')模態( '秀'); –
仍然不起作用:( – Techworld