Hide / show not working in chrome.

Here i some javascript use to input field hide and show. It work in firefox well, but not working on chrome. Below my code to your refferrance.

Visit this link: http://jsfiddle.net/vwt10rce/6/ in chrome and firefox.

$("#other-school").hide();
  
$("#other").click(function(){
   $("#other-school").show();
});
	
$("#school").click(function(){
   $("#other-school").hide();
});  

Open in new window

Milind BhuvadPHP DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
I would say that you should use the change handler instead:

$("#other-school").hide();
  
$("#hos-name").change(function(){
	var selectedValue = $(this).val();
  var school = $("#school").val();
  var other = $("#other").val();
  
  if (selectedValue === school) {
  	$("#other-school").show();
  } else if (selectedValue === other) {
  	$("#other-school").hide();
  }
});

Open in new window


http://jsfiddle.net/jmr485cs/4/
0
leakim971PluritechnicianCommented:
Use this instead : http://jsfiddle.net/vwt10rce/35/
Don't use click event on dropdown option

$("#hos-name").change(function(){
  var display = $(this).val() == "scool1" ? "hide" : "block";
  $("#other-school").css("display", display);
});

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.