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:
> 
> <li><input type="checkbox" value="hello" /></li>
> 
> Then in jQuery:
> 
> $(":checkbox").click(function(){
>      alert(this.value);
> });
> 
> On Sep 25, 1:53 pm, MorningZ <[EMAIL PROTECTED]> wrote:
>> To start with, that html isn't valid, as you have
>>
>> <li><label><input type="checkbox" />hello</input></label></li>
>>
>> with the checkbox <input> 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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/get-html-of-check-box-tp19675962s27240p19676654.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to