IF fields contains then alert
I am struggling to understand where I've been going wrong, but what I got is a div that shows a value depending on what the user selects on the previous screen.
However despite selecting other one's such as Kerb Drainage for example, it always alerts "access"
I've tried having separate IF statements but then they all alert, one after the other.
- if (jQuery('.product_type:contains("Access Cover")').length <= 0) {
- alert("access");
- } else if (jQuery('.product_type:contains("Gully Grate")').length <= 0) {
- alert("gully");
- } else if (jQuery('.product_type:contains("Kerb Drainage")').length <= 0) {
- alert("kerb");
- } else if (jQuery('.product_type:contains("Surface Box")').length <= 0) {
- alert("box");
- }