I have a bit of jQuery that looks like this:
$("#long-selector-1, #long-selector-2, #long-selector-3").filter(":visible").fadeOut(400, function() {
otherDivs.show();
});
I have two competing issues here:
- The line is over 80 characters, so I'd like to break it up
Chaining Jquery statements across multiple lines:
$("#long-selector-1, #long-selector-2, #long-selector-3") .filter(":visible") .fadeOut(400, function() { otherDivs.show(); });
doesn't pass JSHint because of the possibility of automatic semicolon insertion.
Is there a best practice to follow here?