Widget:CampaignCards: Difference between revisions
imported>Pillowkeeper No edit summary |
imported>Pillowkeeper No edit summary |
||
| Line 41: | Line 41: | ||
} | } | ||
function openCard(card){ | function openCard(card) { | ||
console.log(card); | |||
$("div.campaignbox-card").hide(); | |||
$("div.campaignbox-content").show(); | |||
} | |||
$(".campaignbox | function closeCard(card) { | ||
console.log(card); | |||
$("div.campaignbox-card").show(); | |||
$("div.campaignbox-content").hide(); | |||
$("div | } | ||
$("div | |||
} | |||
</script> | </script> | ||
<style> | <style> | ||
. | .campaignbox-content-topbar-back:hover { | ||
cursor: pointer; | |||
color: saddlebrown; | |||
} | } | ||
.campaignbox | |||
width: | .campaignbox-content-topbar { | ||
width: 100%; | |||
} | |||
.campaignbox-content-topbar-name a { | |||
color: inherit; | |||
} | } | ||
.campaignbox { | .campaignbox { | ||
| Line 86: | Line 78: | ||
margin: 8px; | margin: 8px; | ||
} | } | ||
</style> | </style> | ||
Revision as of 19:31, 30 August 2017
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>
<script> var series1 = [];
var obj = {};
obj["name"] = ""; obj["image"] = ""; obj["season"] = ""; obj["description"] = ; obj["key"] = ""; obj["characters"] = ""; obj["playlist"] = "";
series1.push(obj);
for(var i = 0; i < series1.length; i++){
$(".campaign-holder").append('
' + series1[i].season + '
' + series1[i].name + '
' + series1[i].description + '
'+ series1[i].characters +'
| <a href="' + series1[i].playlist + '"> </a> |
');
}
$(".campaignbox-content-characters a").each(function() { var title = $(this).attr("title"); console.log(title) $(this).removeAttr("title");
$(this).wrap("
$(this).after("" + title + ""); });
function reset(e) { $(e.currentTarget).find("span.campaignbox-content-characters-characterbox-tooltip").hide(); }
function move(e) { $(e.currentTarget).find("span.campaignbox-content-characters-characterbox-tooltip").css("top", e.clientY + 10); $(e.currentTarget).find("span.campaignbox-content-characters-characterbox-tooltip").css("left", e.clientX + 10); $(e.currentTarget).find("span.campaignbox-content-characters-characterbox-tooltip").show(); }
function openCard(card) {
console.log(card);
$("div.campaignbox-card").hide();
$("div.campaignbox-content").show();
}
function closeCard(card) {
console.log(card);
$("div.campaignbox-card").show();
$("div.campaignbox-content").hide();
}
</script>
<style> .campaignbox-content-topbar-back:hover {
cursor: pointer; color: saddlebrown;
}
.campaignbox-content-topbar {
width: 100%;
}
.campaignbox-content-topbar-name a {
color: inherit;
} .campaignbox {
width: 200px; height: 184px; border: 3px solid white; border-radius: 10px; overflow: hidden; display: inline-block; background: rgb(33, 33, 33); margin: 8px;
}
</style>


