To make it check on change:
$('#mySelectId').change(function(){
if($(this).val().indexOf('someValue') != -1)
$('#someElement').hide();
});
On Jan 16, 12:30 pm, Wizzud [EMAIL PROTECTED] wrote:
var txt = $('theSelect :selected').text();
if(txt == 'cat' || txt.indexOf('c')==0 || ...test
Thanks!
but the values of this drop down box are dynamic and are coming from a
DB. So I was wondering if jquery offers a method so that rather than
doing '.val()' i could do something else so that I would get search on
content of the option box rather than value. so for example
option
var txt = $('theSelect :selected').text();
if(txt == 'cat' || txt.indexOf('c')==0 || ...test after test after
test...){
$('selector_fieldToHide').hide();
}
On Jan 15, 1:16 pm, Bhaarat Sharma [EMAIL PROTECTED] wrote:
Thanks!
but the values of this drop down box are dynamic and are coming
Something like below should work:
if($('select[name=myDropdown] :selected').val() == 'my value'){
$('input[name=inputToBeHidden]').hide();
}
On 1/14/08, Bhaarat Sharma [EMAIL PROTECTED] wrote:
Hello,
I'm a little new to jQuery.
Is it possible to hide/disable a text field based on a
4 matches
Mail list logo