Answer the question
In order to leave comments, you need to log in
Searching for a value in the table: 1 if found, 0 if not found. Is it possible to?
We managed to find only two functions that look up a value in an array:
1) VLOOKUP
2) MATCH
Both functions return some #N/ A value if they cannot find the value they are looking for in the table. And nothing can be done about this #N/A. How to turn it into zero?
PS I mean exact search (by coincidence), not approximate (when some closest value is selected).
Answer the question
In order to leave comments, you need to log in
Make the class not .prod1 and .prod2, but just .prod, add the data-num attribute and fse:
$('.prod').click(function(){
var num = $(this).attr('data-num');
$('.product-'+num).addClass('hidden');
$('.product-md-'+num).removeClass('hidden');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question