I love taking that first, successful step!
For awhile now, I’ve been itching to incorporate more dynamic jQuery elements into my film website, the Underground Film Journal. I’m always desperately wanting to make the site more modern and interactive, to provide a better user experience for my visitors. And, right now, I think the best way to accomplish that is through jQuery.
That changed when I decided to use the prettyPhoto lightbox clone to load trailers on the Journal’s Underground Films List page. I have other ideas to incorporate other jQuery plugins, but this is where I really wanted to start. I figure if I can do this, I can move on to more elaborate projects.
Now, the beauty of using somebody else’s code, like prettyPhoto, is that you don’t necessarily need to know how it works. However, with WordPress, just loading in outside scripts can be severely tricky if they don’t fire up in the proper order.
So, to get prettyPhoto to work on my own, I didn’t have to learn jQuery, but I did need to learn how to write the proper PHP functions so that WordPress would load jQuery, then prettyPhoto in their proper order.
To learn how to do that, I bought the awesome book WordPress 3.0 jQuery written by Tessa Blakeley Silver that I can’t recommend enough. Although WordPress is up to version 4.2.2 as of this writing, Silver’s book is still relevant and accurate.
What I particularly like about Silver’s writing is that she explains really technical stuff in a relaxed, conversational way. So far, I’ve only read the early chapters and I feel like she’s laid a great foundation for me to understand how jQuery actually works and integrates with WordPress.
To wrap up: I did it! I now have prettyPhoto loading up just fine on the Journal. In and of itself, that doesn’t feel like that amazing of an accomplishment, but I figure if I can get that right, I can incorporate more jQuery goodies in the near future.