Combine "Getting Started with Arduino" Programs

You're not checking the button while you're running the fade, so as you observe, it's hard to catch the exact moment to press the button. I suspect you can hold the button down during the fade and it will switch at the end, but you still have to get your finger off quickly so it doesn't read it again and return to fade mode.

You can check for the button being pressed during your fade loops and break out of them. Probably better though is to remove the for loops. If you're in fade mode, just change i by 1 each time round loop. You'll need some logic to switch between increment and decrement when you get to 0 or 255. Then, you'll be checking the button frequently. Button response may still be a little bit flaky though because of your delays. At that point you'll need to adapt your D variant to an E that's based on the method shown in blink without delay.