[jQuery] Re: get html of check box

2008-09-25 Thread Eric
Quick, but not dirty MorningZ! Good code :-) Annotation: $(document).ready(function() { // DOM is ready: // when we click on a checkbox $(":checkbox").click(function() { // find the next element and take the text of it. alert($(this).next().

[jQuery] Re: get html of check box

2008-09-25 Thread claudes
perfect. got it to integrate swimmingly. thanks c.s MorningZ wrote: > > > Here's some quick and dirty (and working) code > > http://paste.pocoo.org/show/86213/ > > -- View this message in context: http://www.nabble.com/get-html-of-check-box-tp19675962s27240p19677870.html Sent from the

[jQuery] Re: get html of check box

2008-09-25 Thread MorningZ
Here's some quick and dirty (and working) code http://paste.pocoo.org/show/86213/

[jQuery] Re: get html of check box

2008-09-25 Thread claudes
actually what i'm after is the label "hello" so if the checkbox is checked, i'd like to alert the label, which is hello tlphipps wrote: > > > I'm guessing what you're after is just getting the value of the > checkbox. What MorningZ said is absolutely correct. I would suggest > you try: >

[jQuery] Re: get html of check box

2008-09-25 Thread tlphipps
I'm guessing what you're after is just getting the value of the checkbox. What MorningZ said is absolutely correct. I would suggest you try: Then in jQuery: $(":checkbox").click(function(){ alert(this.value); }); On Sep 25, 1:53 pm, MorningZ <[EMAIL PROTECTED]> wrote: > To start with,

[jQuery] Re: get html of check box

2008-09-25 Thread claudes
my error: hello it is just a basic example of what i have marked up MorningZ wrote: > > > To start with, that html isn't valid, as you have > > hello > > with the checkbox ending in "/>", which closes the tag, hence > the "hello" is not inside the input tag. even if you take that >

[jQuery] Re: get html of check box

2008-09-25 Thread MorningZ
To start with, that html isn't valid, as you have hello with the checkbox ending in "/>", which closes the tag, hence the "hello" is not inside the input tag. even if you take that out, pretty sure that's not valid html anyways