Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 26th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $("#yourselectlistid").change(function(e) {
  2.    
  3.    console.log(this);
  4.  
  5.    if(this.value() == "whatever") {
  6.       $('#elementid').show(); //or do all elements with class
  7.       $('.elementsclassname').show(); //you can just alternate this to hide() if you are doing that.
  8.    } else {
  9.       $('#elementid').hide(); //or do all elements with class
  10.       $('.elementsclassname').hide(); //you can just alternate this to hide() if you are doing that.
  11.    }
  12.  
  13.  
  14. })