FlyoverWorks is now part of Cultivate Labs! Check us out here.

FlyoverWorks Blog

Articles and tips from your smart, witty, and talented FW employees.

Javascript & jQuery

I've had parts of this post written for weeks and haven't been able to tackle it. I think the main reason is that I've been pretty damn frustrated with my class projects.

We started Javascript and jQuery two weeks ago. When I started the Front End Web Development class with General Assembly, they cautioned that at this point, a lot of students feel defeated and even end up quitting. They had every reason to warn us.

Javascript is a language that controls actions on the website – like what happens when a user clicks a button or having different messages appear when a page loads based on the time of day.

We started by practicing the syntax (how the code is written) for different Javascript actions. It seems simple enough. But having one period in the wrong place, or a capital letter where it shouldn't be, can ruin your whole night.

Our first homework assignment using Javascript was to create a temperature converter. To do this, we had to apply two actions to two buttons, and make sure that the mathematical equation was written correctly to convert the user's entry to the right answer. When I got stuck, I went back and styled my simple site a little more. If it didn't work right, at least it would look pretty. This first assignment was tricky, but I was able to pull it off with some googling and a little help from my instructor.




Next we learned about jQuery. It's a Javascript library that you add to your code, allowing you to write Javascript in a much simpler way. It became a little easier to understand how to select elements on a page and apply an action to them.

For our next assignment, we were given a list of actions to create on an already existing site. For example, when a user clicked on the header of the page it would slide up and disappear. I enjoyed this assignment, and was proud when I got most of the actions working on my own.



However, I learned that it's very different deciding for yourself which actions need to happen and when. This is when writing pseudo code is very important. Pseudo code is a step-by-step outline of the actions you want to have happen on your site. Not only does it help you plan out what the actual code will be, but it helps anyone who works on your code in the future understand exactly what it was you were trying to accomplish.

Our next assignment was to create an image carousel with buttons that would control the flip-through. We also had to disable the 'previous' button at the beginning, and the 'next' button at the end. I got the images to switch when I clicked either button, but could not for the life of me get those buttons disabled.

There were a couple smaller exercises after the carousel, none of which made me feel better about my ability to write Javascript and jQuery. I was dreaming about code at night, trying to solve the problems that I couldn't fix. I felt like I was starting to go crazy.

Then on Wednesday we reviewed some material and had a new lab to try. We had to create an interactive navigation menu for a fake clothing website. I don't know if it was the extra review, my familiarity with navigation, or that the wonderful producer for General Assembly brought us cupcakes... but I was finally able to get all of my jQuery working how it was supposed to. I left class excited, rejuvenated, and ready to keep marching on through our remaining 4 weeks.



The past few weeks have been tough, to say the least. But I know I can figure all this out. If it was easy, everyone would be doing it.

I'm starting my final project, so I'm sure this won't be the last post filled with highs and lows. But we all have to do a little struggling to learn and I am excited to keep learning some front end web development.