I have a div having a css class "MyClass". Inside this div, I can have any number of checkboxes immediately followed by an anchor having some specific text (lets say MyText for the example).
How can I select all the checkbox elements using JQuery. What I have is
$('div.givenclass input:checkbox')."I DON"T KNOW WHAT TO PUT HERE"
I want to make sure the the checkboxes I get are immediately before an anchor tag with text "MyText".
Please help!