Backbone Views Scoped Queries

Like Dave Brailsford, I’m a fan of marginal gains and love discovering small tips and tricks to optimise my development workflow. So in the spirit of marginal gains, here’s a tiny productivity tip for Backbone.js that I stumbled upon the the other day.

If you have jQuery included and need to target a child of your view’s el, instead of this…

view.$el.find('.some-other-element');

You can just write…

view.$('.some-other-element');

BOOM. milliseconds of typing time saved.

Every Backbone view has a $ function that runs scoped queries within the view’s el. Probably obvious to most as it’s right there in the docs, but I only just noticed it so am recording it here as an aide memoir.

Castle Wealth

I was hired by Independent Financial Advisers Castle Wealth to design and develop their new corporate website.

Building a financial site was a new experience for me and I thoroughly enjoyed the challenge of finding the balance between a corporate and friendly design.

The website is fully responsive and was built using HTML 5, CSS animations, Foundation and Sass.

Visit website.