Nicholas Cheek

LITTLE ROCK WEB DEVELOPER

<script>
    // Finds when option changes
    $("#doc_downloads").change(function(){
    // varible to hold string
    var str = "";
    $("#doc_downloads option:selected").each(function(){
    // when the select box is changed, we add the value text to the varible
    if($(this).val() == "Document"){
       str="";
    } else {
    str = '<a href="' + $(this).val() + '" target="_blank"><img src="{site_url}assets/images/downloaddoc.png" /></a>';
    
    }
    });
    // then display it in the following class
    $(".display_text_here").html(str);
    }).change();
</script>

LITTLE ROCK WEB DEVELOPER

Living the dream.

nick@nicholascheek.com