I'm dynamically assigning tables as data1, data2, data3, yadda yadda. Inside these tables, I need a function that grabs the closest table's class, so I can assign it as the cookie name.
So in theory, I should be able to go inside data2, click on this function, get a data2 cookie, and ta dah.
I'm hoping the solution to this problem will provide insight to how I can assign the cookie value, but right now, I'm just focusing on the name.
How would I grab the closest table's class?
I've tried $(this).closest("p").class.val() and other combinations...
I have a layout where I'm displaying data. All of the checkboxes are by default checked and all the tables are visible. These tables are generated and only contain one row with six columns.
The fifth column will have a status; for example, Empty or Taken. I've assigned the td class to it either Empty or Taken.
So if I uncheck this checkbox, all the tables with this Taken class as one of its columns should be hidden.
I was hoping this code would work (haha. My code never works) but I've messed and messed with it and can't even get a workaround.
find() isn't so great. I'd rather not use it because it also highlights whatever it finds. I've tried td.Taken. .Value seems to only return true, false, or an object.