Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @supersvetodiod

    I’m not sure about your question, but I guess you are referring to this equation:

    (function(){
        var result = fieldname18, 
            url = '';
        
        jQuery('.image-container').html('');
        
        if(result == 2) url = 'http://led-calc.ru/path-to-the-image/image-a.png';
        else if(result == 1) url = 'http://led-calc.ru/path-to-the-image/image-b.png';
        else if(2 < result) url = 'http://led-calc.ru/path-to-the-image/image-c.png';
        
        if(url != '') jQuery('.image-container').html('<img src="'+url+'">');
        return result;
    })()

    The URLs in my code are hypothetical, you should replace them with the correct ones.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Multiple “if”( if==1, if==2, if>2, etc.) variables with image display’ is closed to new replies.