This should work fine
$(document).ready(function() {
$("#directors input[type='checkbox']").click(function() {
$('span.RelStatus').each(function() {
var RelStatusValue =
$(this).find("span").text();
could you paste the outputted html to jsbin, in the meantime, try this
$(document).ready(function() {
$("#chkIncludeRetired").click(function() {
$('.RelStatus').each(function() {
var RelStatusValue = $(this).text();
if (RelStatusValue == 'Retir
I removed some of the server-side code but this is it. thanks
$(document).ready(function() {
$("#chkIncludeRetired").click(function() {
$('#table1 .RelStatus').each(function() {
var RelStatusValue = $(this).text();
if (RelStatusValue == 'Re
I'll need to see your html to see why, but I suspect it's because you
targeted a specific id #table1.RelStatus.
evanbu...@gmail.com wrote:
Very cool. This is what I have now but it only hides the first div
containing the RelStatus value = 'Retired'
$(document).ready(function() {
Very cool. This is what I have now but it only hides the first div
containing the RelStatus value = 'Retired'
$(document).ready(function() {
$("#chkIncludeRetired").click(function() {
$('#table1.RelStatus').each(function() {
var RelStatusValue = $(this).t
$("span a").click(function(){
var checkValue = $(this).parents("div").attr("value");
if (checkValue == 'Retired'){
$(this).parents("div").toggle();
}
return false;
});
You will see the parents function, this allows you to traverse up the dom.
Right, but how do I associate the span tag which contains the value =
'Retired' with the div that contains it? In other words, I need to
toggle the contents of the entire div and not just the span tag.
Thanks.
On Jul 23, 7:41 am, Liam Potter wrote:
> use an if statement, "if value == retired, d
use an if statement, "if value == retired, do this"
evanbu...@gmail.com wrote:
Hi
I'm not sure how to approach this. I want to toggle each div with a
checkbox or hyperlink which shows/hides every div where the RelStatus
value = 'retired'. I'm able to see the value of each RelStatus value
using
8 matches
Mail list logo