So I\'m using a shorthand javascript if
/else
statement (I read somewhere they\'re called Ternary statements?)
this.dragHandle.hasClas
This doesn't exactly answer your question, but ternaries allow you to write less than you've shown:
direction = this.dragHandle.hasClass('handle-low') ? "left" : "right";
And now that I think about it, yeah, you can do your question too:
slideOffset + direction == "right" ? = $(".range-slide").width() : = 0;
This is a theory. The next time I have an opportunity to +=
a ternary I will try this. Let me know how it works!