I am trying to improve my coding skills, but I can not seem to figure this out. How do I write the following in shorthand?
/* fade */
$('.toggle-ui').on({
    'click': function (e) {
        e.preventDefault();
        var divToFade = ['#logo', '#hide-interface'];
        $.each(divToFade, function(intValue, currentElement) {
            // check alpha state and switch
            var currOp = $(currentElement).css('opacity');
            if (currOp == 1) $(currentElement).css('opacity', 0.5);
            if (currOp == 0.5) $(currentElement).css('opacity', 1);
        });
    }
 
     
     
     
    