Bug Tracker

Modify

Ticket #10312 (closed bug: invalid)

Opened 20 months ago

Last modified 20 months ago

:checked selector fails

Reported by: yeux_tristes@… Owned by: yeux_tristes@…
Priority: low Milestone: None
Component: selector Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

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>

Change History

comment:1 Changed 20 months ago by timmywil

  • Owner set to yeux_tristes@…
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to selector

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

comment:2 Changed 20 months ago by yeux_tristes@…

  • Status changed from pending to new

Works fine on Edge version.

comment:3 Changed 20 months ago by timmywil

  • Status changed from new to closed
  • Resolution set to invalid

Thanks for looking into it.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.