{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

22jquery-2up - 22 jQuery 30 Sept 2010 CSCC09F Programming...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
22 jQuery 30 Sept, 2010 CSCC09 Programming on the Web 1 22 jQuery CSCC09 Programming on the Web 1 jQuery motivation, binding, event handling, reading and writing DOM elements CSCC09F Programming on the Web 22 jQuery CSCC09 Programming on the Web 2 Why jQuery? boxshadowdwn Isn’t this course about learning the fundamentals, not frills? Can’t we do everything necessary in plain JS + DOM? boxshadowdwn Yes, but … writing JavaScript code is a tedious, time-consuming, and error-prone process, e.g.: circleshadowdwn significant effort required for DOM navigation circleshadowdwn need to accommodate browser differences circleshadowdwn unexpected effects due to browser loading order circleshadowdwn lack of mature tools to support development boxshadowdwn Why jQuery, not Prototype, Scriptaculous, or … ? jQuery most widely adopted, lots of momentum
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
22 jQuery 30 Sept, 2010 CSCC09 Programming on the Web 2 22 jQuery CSCC09 Programming on the Web 3 Why jQuery? 22 jQuery CSCC09 Programming on the Web 4 Why jQuery? boxshadowdwn A few reasons why jQuery seems more powerful (less effort/smaller code) and easier to use than other libraries: circleshadowdwn Queries can be chained together (each jQuery returns itself so you can chain them together) for complex tasks circleshadowdwn arrays/collections of results can be used as a single unit eg: $('.tab').hide() could hide all elements of class tab circleshadowdwn The API, including its use of CSS selector notation, is intuitive, consistent, and common sense, so even with only a little knowledge you can usually achieve your desired result circleshadowdwn jQuery has an extensible plugin architecture that has spawned a large community of plugin features useful for building RIA/Web 2.0 type applications boxshadowdwn Some of these are matters of opinion, but there’s no disputing jQuery is now the most popular plugin
Image of page 2
22 jQuery 30 Sept, 2010 CSCC09 Programming on the Web 3 22 jQuery CSCC09 Programming on the Web 5 Why jQuery? boxshadowdwn Learning the fundamentals doesn’t mean we have to do everything the hard way (think back to Python in 1 st year, you used sort() before learning how to code it) boxshadowdwn Simplifies code – which makes it easier to get right boxshadowdwn With a single consistent interface you can control: circleshadowdwn DOM interaction circleshadowdwn Event handlers circleshadowdwn Style properties
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern