javascript - Show DropDown based on selection -


I created a basic drop down list for the operator I was thinking that the basis of selection There is a way to display dropdown items on. If I have an integer than the operator dropdown in the category drop down, then only the integer will show related items.

Thanks

should you do it?

Javscript:

$ (document) .ready (function () {$ (document) .on ('change', '. Category', function () { Var val = $ (this) .val (). ToLowerCase (); $ ('operator option'). Skip (); $ ('operator option.' + Val) .show (); $ ('operator operator ( 'Selected', 'selected'). Change ();});});

HTML:

  select class = "category "& Gt; Option val =" value "> gt; value & lt; / option & gt; option val =" weight "> weight 

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -