here you go:
<p>Your University<br />
<span class="wpcf7-form-control-wrap your-university"><select name="your-university" class="wpcf7-form-control wpcf7-select wpcf7-validates-as-required">
<option value="Brock University">Brock University</option>
<option value="McMaster University">McMaster University</option>
<option value="Queen's University">Queen's University</option>
<option value="University of Guelph">University of Guelph</option>
<option value="University of Toronto">University of Toronto</option>
<option value="UofT Mississauga">UofT Mississauga</option>
<option value="UofT Scarborough">UofT Scarborough</option>
<option value="University of Waterloo">University of Waterloo</option>
<option value="York University">York University</option>
<option value="Western University (UWO)">Western University (UWO)</option>
<option value="Other">Other</option>
</select>
</span>
</p>
jQuery(document).ready(function($){
$('.wpcf7-form-control').change(function(){
var sel_opt = jQuery(this).val();
alert(sel_opt);
if(sel_opt=="McMaster University")
{
alert("Message for McMaster");
}
else if(sel_opt=="York University")
{
alert("Message for York");
}
else if(sel_opt=="Other")
{
alert("Message for Other");
}
});
});
EDIT:
in the interests of SO policy/users, lets explain. i changed one line:
$(':input#wpcf7-form-control-wrap your-university').live('change',function(){...
to
$('.wpcf7-form-control').change(function(){...
You'll also note that i replaced $
with jQuery
in the in the first call and passed in $
which wasnt in the original answer i gave :)