Within a .hover()
event, I have the following code:
$(this).css('background-position', circle.includesXY(e.pageX, e.pageY) ? 'bottom' : '');
Could somebody explain how I can add more property:value pairs to .css()
without compromising the ternary operator? If not, how should it be rewritten?
.css
also accepts an object: