javascript - Is there another option for jquery opacity? -
i have series of sliders control items / links on site. http://wp11004271.server-he.de/alloytoy4.0/. @ moment there 2 options these links, available (dark background) , unavailable (light background). add in-between variables links available in capacity.
var filter = {}; var unmarkitem = function (alloy) { var domalloy = $('#alloy_' + alloy); domalloy.css('opacity', 1); // alloys[alloy].marked = false; }; var markitem = function (alloy) { var domalloy = $('#alloy_' + alloy); domalloy.css('opacity', 0.2); // alloys[alloy].marked = true; };
iam familiar true or false want add other options. thoughts on add?
you using marked
boolean, means, can 2 values assigned to: true
or false
.
if want more options, recommend use marked
integer, means number without decimal places (guess thats right word it, if not, correct me) without comma.
create variables called example mode_disabled
, mode_inactive
, mode_active
, etc. , assign number values them, var mode_disabled = 1;
or that.
then can set modes like
alloys[alloy].marked = mode_inactive;
and dont have keep in mind whats value mode.
your function markitem
should second parameter value.
Comments
Post a Comment