I have this table that is currently 1200+ rows, of which these rows have a column that has a 3 dot (0.0.0) version number in them. So what I have at the moment at least unless a better way is presented is. The columns I am looking for have a class, and a rel. The rel has the same value as that displayed for that column.
What I also have is a select box, that has these same versions listed in it. The idea is to be able to select a version and have the table hide all rows with versions that are not the one selected, leaving only the selected version visible.
This is my failure of an attempt currently. I have tried a few variations but I keep ending up with a syntax error of some sort.
$('#client_version').change(function()
{
var vers = $(this +' option:selected').val();
$('.zm_ver').each(function(index, elem)
{
var theCol = $(elem);
if(theCol.attr('rel') == vers){alert('yes');return true;}
else
{
theCol.parent().hide();
}
});
});
You can use:
Note:
this.valuegives you the currently selected value in the<select>