I’m having a hard time with jQuery, especially when it comes to writing code intuitively. My question is this: What was the moment for you when jQuery became second nature?
This isn’t intended to be a book/article recommendation, but those are fine if that’s what made jQuery click for you.
Thanks in advance,
Took a long time for me. I started with just having a few hide() / show() thingies here and there and some scrollUp() / scrollDown(). Very basic, in all my work. Then from there, it just grew really…. I started to add a few more functions/effects in some sites, I installed a few plugins, and little by little it just became more natural.
I’m a firm believer that you should (have to) force yourself into using any technology just for the sake of using the technology. If you just let things progress naturally, it’ll be easier along the way. You’ll bump into situations where you’ll think “ah, that’s where I should use some jQuery” and so you’ll make another step. Before you know it, it’ll be very intuitively.
Having said that, it’s also very helpful to just experiment and try stuff. That’s when you’ll discover stuff that you will find so helpful, that it’ll become second nature to use it. For me, it was when I figured out how to read and manipulate form fields very easy. Of course I use that all the time now.
Cross-browser JS headaches made me start with jQuery, for example event handling. I wasn’t even that good at JS at that time, but it was easy to learn because I was already programming in other languages and thanks to jQuery I didn’t have to deal with cross-browser inconsistencies until I felt like it was time to stop using jQuery for everything.
For example I don’t do stuff like `$(this).attr(‘id’)` anymore because `this.id` is already cross-browser. This is a nice article to read with more of those examples: http://remysharp.com/2013/04/19/i-know-jquery-now-what/
This one: http://codepen.io/CrocoDillon/details/sxgzF I could have made with jQuery, but I wanted to try without… don’t know if it works in IE8- because CodePen stops working there but I’m happy with the result :P I still not totally comfortable with the way JS handles Object Oriented programming though.
You must be logged in to reply to this topic.