jQuery and Ajax, a lesson in patience and perseverance…
It’s safe to say that web developers enjoy a challenge, it comes with the territory. Whether you’re embarking on a new project requiring technical elements you’re less familiar with, or ‘simply’ carrying out general maintenance on past work; there’s always the potential for unforeseen challenges to arise. That said, these challenges should always be seen as an enormous opportunity to learn or, at the very least, gain valuable experience for the future.
jQuery is a programming language that I admit as being one of my weaker skills. I get by with experiences from past work and fill any gaps using an amazing book “JavaScript & jQuery” by Jon Duckett. However, being more proficient is definitely on the ‘to-do’ list. Little did I know the scale of how flexible and adaptable jQuery can be!
My employer, Quadrant2Design, the UK’s leading full service exhibition stand contractor identified the requirement to provide existing and prospective clients with a unique online resource. This would be to firstly showcase the variety that our modular solution can provide clients from a design perspective. Secondly, it needed to highlight the different features that a modular exhibition stand can include. After this idea was briefed, I considered the key requirements:
- It must be built in WordPress on a bespoke theme.
- Adding new content or “ideas” to the site must be an easy process for non-developers.
- Pinterest-style masonry layout.
- Filter function with 5x search parameters:
- Industry
- Stand size
- Open sides
- Colour
- Design feature
After researching what my options might be, the solution I chose had two parts. Part one involved creating a WordPress custom post type with its own set of taxonomies acting, in this case, as the search parameters (industry, stand size etc.) This would then be combined with part two; a jQuery and Ajax integration which will take care of processing the filter and output the relevant results.
Development began and part one was a routine process, including many tasks that I complete on the majority of new builds in WordPress.
Part two proved to be a huge learning curve, one that required (as this post’s title suggests) a fair amount of patience and perserverance. The process of getting the jQuery and Ajax elements integrated and functioning correctly was a combination of code, test, troubleshoot and repeat. Thankfully this paid off and the result was a fully functioning filter that took the inputs from the user, and output the relevant results. This was a unique project to me as it involved using a WordPress custom post type as the main component that the filtering element would be based around. The jQuery and Ajax integration was hugely challenging but the experience of working more closely with it will only benefit future projects. The key requirements of the brief were delivered and we now have a unique and valuable source of ideas and inspiration for our clients. exhibition-stands.com is a forever-evolving site with new content being added daily.
My advice to anyone that’s been aprehensive about throwing yourself in at the deep-end with jQuery…do it! The potential is endless!