Re: [jQuery] Basic Bind Question

2009-12-04 Thread Karl Swedberg
Oh yeah, that too! :-D --Karl On Dec 4, 2009, at 1:41 PM, Rey Bango wrote: Yep Karl's explanation was great. Also, you can leverage bind() to work with your own custom events in the case where you want to define something that needs to be triggered based on another action. Using the code

Re: [jQuery] Basic Bind Question

2009-12-04 Thread Rey Bango
Yep Karl's explanation was great. Also, you can leverage bind() to work with your own custom events in the case where you want to define something that needs to be triggered based on another action. Using the code from the docs, you can see what I'm talking about: $("p").bind("myCustomEvent",

Re: [jQuery] Basic Bind Question

2009-12-04 Thread Charlie Griefer
Hi Karl: Awesome! Got it :) Thanks for the explanation and examples. Charlie On Fri, Dec 4, 2009 at 9:01 AM, Karl Swedberg wrote: > Hey Charlie, > > methods such as .click() and .mouseover() are just convenience methods. > They all use .bind() internally. One nice thing about .bind() is that

Re: [jQuery] Basic Bind Question

2009-12-04 Thread Karl Swedberg
Hey Charlie, methods such as .click() and .mouseover() are just convenience methods. They all use .bind() internally. One nice thing about .bind() is that you can use multiple event types with it. For example, instead of doing this: $('a') .mouseover(function() { var $link = $(this)

[jQuery] Basic Bind Question

2009-12-04 Thread Charlie Griefer
Hi All: I've read over the docs, but don't quite understand what the bind() event provides versus just assigning a particular event handler to a selected element (or set of elements). For example, consider the code below. What's the difference between the interaction with the elements of class