Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts

    Question Most common jQuery noob mistakes?

    hey folks,
    I'm working on a top 5 or top 10 list of the most common mistakes made by folks new to jQuery. The first most obvious ones I can think of:

    - loading jQ more than once on the same page
    - using more than one library without taking the correct precautions to prevent conflicts
    - lack of knowledge of the power of jQuery selectors

    my list is much longer but I want to get other people's opinion on the matter,

    thanks!

  • #2
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    Quote Originally Posted by DanInMa View Post
    I'm working on a top 5 or top 10 list of the most common mistakes made by folks new to jQuery.
    In my experience, the most common mistake noobies to jquery make is not learning the fundamentals of javascript first. Not having a grasp of the basic principles of javascript means they will most likely be floating around in forums forever looking for someone to drag them out of the "coding quicksand" they will most likely keep falling in.

    The second most common mistake is that they think jquery can be a shortcut to client side functionality - see above why it isn't.

    The 3rd most common mistake is that they think that to perform a given task, jquery will need less code. That's a load of baloney. If they look at the "back end" code jquery runs to perform a task it will very most likely be quite a bit more than the amount of plain javascript code it would take to perform the same task.

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,916
    Thanks
    6
    Thanked 1,040 Times in 1,013 Posts
    One of the most common jQuery n00b mistakes is that they just copy and paste together random scripts they found on the internet because they just found something that looked good visually, and then they have no idea why it’s not working.

    And your first two points, Dan, are actually just a result of that.

    jQuery is super practical and comfy but it also tempts to overuse and not understand it.

  • #4
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Well this is a good start.

    While you make great points webdev, I'm aiming more from the perspective of us pro jQuery folks . I understand it has it's pro and cons, which are defintely valid. My goal is to whittle it down to the top 10 or so common mistakes of beginners, and provide links to documentation , multiple examples etc..

  • #5
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    Quote Originally Posted by DanInMa View Post

    While you make great points webdev, I'm aiming more from the perspective of us pro jQuery folks ..
    oh, ok.

    Your op wasn't clear, so I assumed you were referring to "nooby" noobies to jquery.

  • #6
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,398
    Thanks
    12
    Thanked 570 Times in 563 Posts
    Most common mistakes from jQuery noobs from my perspective (in no specific order) are:

    Sometimes they
    1. don't know about $(document).ready(function()) / $(function())
    2. try to bind event handlers to not-yet-existing elements without using .live() / .delegate() / .on()
    3. don't get the meaning of "asynchronous" and "callback" for Ajax or other similar constructs
    4. don't know that they need to include jQuery in an additional <script> tag
    5. expect dragged elements to be physically (DOM-wise) inside the droppable container automatically after jQuery UI drag/drop
    6. don't understand the difference between a DOM element and its "jQuery representating object"

    EDIT
    7. don't know the difference between setter and getter methods and that generally only setter methods can be used for chaining with the original jQuery object whereas getters change the object
    Last edited by devnull69; 12-02-2011 at 01:38 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •