I finally figured out a part of the new website yesterday that had caused me a problem for 6 weeks. It's frustrating because I don't have a human resource to toss ideas around with about fussy jquery code and floating boxes floating too far.
I have to rely on myself to clean up the messes I make. The good part is that once I learn it, it takes me to a new level of expertise. The sense of accomplishment is great, even if the learning curve seems painful.
I find that I need to lose focus to regain it again. It used to happen the same way when I played classical piano. I would struggle with the mechanics of a piece for ages, give up and walk away from it for a week or more, and then when I sat down to try again, it would happen naturally.
It's no difference with coding something from scratch. Sometimes I just need to walk away and when I come back, the pieces fall into place.
When I am forcing myself to keep going despite struggling, I need to remember that giving up for a bit may be all I need to get my focus back.