[jQuery] Re: Creating callable methods, and binding them to objects' actions.

2009-02-19 Thread Ricardo Tomasi
I meant to say they are not required (when the value has no special characters). cheers, - ricardo On Feb 19, 1:02 pm, mkmanning wrote: > Missed the colon, the single quotes should be OK; the jQuery docs' > example even uses them: $("input[name='newsletter']") > > On Feb 19, 12:11 am, Ricardo T

[jQuery] Re: Creating callable methods, and binding them to objects' actions.

2009-02-19 Thread mkmanning
Missed the colon, the single quotes should be OK; the jQuery docs' example even uses them: $("input[name='newsletter']") On Feb 19, 12:11 am, Ricardo Tomasi wrote: > I don't think you need the colon in there (nor the single quotes) > > $("input[name=donation_type]") > > On Feb 19, 4:04 am, mkman

[jQuery] Re: Creating callable methods, and binding them to objects' actions.

2009-02-19 Thread Ricardo Tomasi
I don't think you need the colon in there (nor the single quotes) $("input[name=donation_type]") On Feb 19, 4:04 am, mkmanning wrote: > You shouldn't have to refer to the same object in different ways,  $ > ("input:[name='donation_type']") will work for both getting the value > and binding an e

[jQuery] Re: Creating callable methods, and binding them to objects' actions.

2009-02-18 Thread mkmanning
You shouldn't have to refer to the same object in different ways, $ ("input:[name='donation_type']") will work for both getting the value and binding an event. The "@" before the attribute name was deprecated as of version 1.2 On Feb 18, 9:51 pm, gberz3 wrote: > Ok, I got it to work using the f

[jQuery] Re: Creating callable methods, and binding them to objects' actions.

2009-02-18 Thread gberz3
Ok, I got it to work using the following: $("#chargetotal").change(updateDonationTotal); $("input:[name='donation_type']").change(updateDonationTotal); I mistakenly posted chargetotal as the radio when it was actually a text field. That said, what is the difference between the following items:

[jQuery] Re: Creating callable methods, and binding them to objects' actions.

2009-02-18 Thread mkmanning
try: $("input:[...@id:chargetotal]").change(updateDonationTotal); On Feb 18, 1:55 pm, gberz3 wrote: > Hi All, > > I'm having a bit of a problem with selectors and binding in jQuery. > Basically I want to do 2 things: > > 1) create a javascript method callable by name that updates a div > 2) bind