drop down menu - Jquery Hide/show using dropdown options not working IE or CHROME -


I have a menu drop down that I am using to show / hide rows in my table.

Example:

  & lt; Select name = "kp1_action" class = "longboxsmall" & gt; & Lt; Option class = "hidenextrow" value = "" & gt; Button disabled & lt; / Option & gt; & Lt; Option class = "showtransferoptions" value = "transfercall" & gt; Call to call + Log keypress & lt; / Option & gt; & Lt; Option class = "shown text" value = "logkeyper" & gt; Log Keepers For Reports Only & lt; / Option & gt; & Lt; Option class = "shown text" value = "optout" & gt; Opt Out Call Call & lt; / Option & gt; & Lt; / Select & gt;  

I have assigned classes to each of the different options, so I can trigger the event when they are clicked. This is my jQUERY.

  $ ("."). Click (function () {$ (this) .closest ("tr"). Next (). Show (). (Search for '. Longboxsmall') Hide ();}); Click $ ("Showtransferoptions") (function () {$ (this) .closest ("tr"). Next (). Show (). ('.longboxsmall') search. Show ();}); $ (". Hidenextrow") (function () {$ (this) .closest ("tr"). Next (). (). ('. Longboxsmall'). Hide ();});  

Everything works perfectly in Firefox but why not IE or Chrome do so? Is there a better way of doing the above work?

I change the "change" event to SELECT instead, and then in the event handler, evaluate the value of SELECT Please.

  $ ("SELECT [name = kp1_action]"). Change (function () {if (this.value = = "Transfercall") {...} // or if ($ (this) .hasClass ("shown")) {...}});  

Comments