Widget:TreasureCardFilter: Difference between revisions
From Unforgotten Realms Wiki
Jump to navigationJump to search
imported>Plornt mNo edit summary |
imported>Plornt No edit summary |
||
| Line 1: | Line 1: | ||
<script> | <script> | ||
function | window.addEventListener("load", function () { | ||
var FILTER_INITIALIZED = false; | |||
var FILTERS = []; | |||
var $GEMS = $("[data-filter-binding]"); | |||
$GEMS.bind("click", function (ev) { | |||
if (FILTER_INITALIZED == false) { | |||
FILTER_INITIALIZED = true; | |||
}); | $GEMS.each(function () { | ||
$(this).addClass("gem-deselected"); | |||
}); | |||
} | |||
ev.preventDefault(); | |||
$(this).toggleClass("gem-deselected"); | |||
}); | |||
}); | |||
</script> | </script> | ||
<style> | <style> | ||
Revision as of 14:29, 6 June 2015
<script>
window.addEventListener("load", function () {
var FILTER_INITIALIZED = false;
var FILTERS = [];
var $GEMS = $("[data-filter-binding]");
$GEMS.bind("click", function (ev) {
if (FILTER_INITALIZED == false) {
FILTER_INITIALIZED = true;
$GEMS.each(function () {
$(this).addClass("gem-deselected");
});
}
ev.preventDefault();
$(this).toggleClass("gem-deselected");
});
});
</script> <style> .gem-deselected { -webkit-filter: grayscale(100%); filter: grayscale(100%); filter: gray; filter: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' height='0'><filter id='greyscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0' /></filter></svg>#greyscale"); } </style>
Filters
Cost: Coin


