data-ajax-*: Collapse event switch

- Use if/else since they only have 2 paths in each
- Wrap lines at 80 chars for ease of reading GH diffs
- Trim trailing spacees
Build: Fix IE8 vapour concating
Merge pull request #3318 from nschonni/v4-data-ajax-switch-tweak

V4 data ajax switch tweak & IE8 vapour build fix