Side navigation
#10312 closed bug (invalid)
Opened September 19, 2011 11:13PM UTC
Closed September 20, 2011 04:36PM UTC
:checked selector fails
Reported by: | yeux_tristes@hotmail.com | Owned by: | yeux_tristes@hotmail.com |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | selector | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Seen using form validator. Code that works:
$(document).ready(function(){
$("#tres").validate({
rules: {
contacto: {
required: true,
email: {
depends: function(element) {
return '''$("#treschk").is(':checked');'''
}
}
}
}
})
});
Code that doesn't work:
$(document).ready(function(){
$("#tres").validate({
rules: {
contacto: {
required: true,
email: {
depends: function(element) {
return $("#treschk:checked");
}
}
}
}
})
});
The test form:
<form id="tres">
<input type="checkbox" name="treschk" id="treschk"/>
<input type="text" id="contacto" name="contacto" class="required"/>
<input type="submit" value="Do!"/>
</form>
Attachments (0)
Change History (3)
Changed September 20, 2011 01:32PM UTC by comment:1
component: | unfiled → selector |
---|---|
owner: | → yeux_tristes@hotmail.com |
priority: | undecided → low |
status: | new → pending |
Changed September 20, 2011 03:06PM UTC by comment:2
status: | pending → new |
---|
Works fine on Edge version.
Changed September 20, 2011 04:36PM UTC by comment:3
resolution: | → invalid |
---|---|
status: | new → closed |
Thanks for looking into it.
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.
If this is an issue with the validate plugin, it should be filed here