jQuery Object Binding & 'this' keyword

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,145
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 22, 2011

I'll show you how to use JQuery Objects and bind the object you are inside with the 'this' keyword.

http://jream.com/learning

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (JREAMdesign)

  • @JREAM - Prototype is a powerhouse but maaaaaan is it a lot of key strokes in comparison to jQuery. i've found myself clinging to jQuery though in the quick hitters, but when i'm on application or commercial level projects i tend to utilize Prototype because it just "feels" more appropriate for some reason. But i'm guessing this debate will rage on.

  • @goon245 I agree 100% with you. I know Apple uses Prototype, they are a huge company! If JQuery had the Object extension, Class Creation built in, and Templating built in, Id be very happy. The Object object in Prototype is just awesome, I wish JQuey had it :(

  • esa idea es infinita muchas gracia spor la info :D

  • @rapblack2 Hope you understood the video because I have no idea what you said!

Top Comments

  • @MelvinSF Weird thing about JQuery is the do something funny with 'this'. I cant decide if I like Prototype JS or JQuery better, because JQuery is much more pleasant to type, but Prototype has classes and templates built in if you wanna go custom the whole way rather than use 3rd party plugins.

see all

All Comments (18)

Sign In or Sign Up now to post a comment!
  • Did it! jsfiddle /unbmd/1/

  • I've found a bug: jsfiddle /unbmd/ .

    Try looking in console so you shall see first variable works, and second doesn't.

    Than, delete .bind(this) so you shall see first variable doesn't work, and first work.

    I could make _ww variable in global scope, but I don't think is a good ideea.

  • @JREAMdesign si no entiendes español te lo digo en inglesI think the idea is infinite thx u

  • @JREAMdesign That's OK. Cool stuff. I am definitely going to dive deep into Javascript once I finish up my current PHP project.

  • @MelvinSF Oh I see. Sorry I was a bit off topic. Prototype supports an easy way to create classes. However, JQuery's John Resig recently made a class creator to lay on top of JQuery but I haven't tried it out. It's a hard decision for me, because JQuery syntax is so nice, and getting used to Prototype $ $('.classSelector').invoke('ob­serve', 'click', function(e) {}); is a bit odd.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more