android - How to show the button in dropdown event? -


hai have button , dropdown.when change dropdown hide button working fine.event after want show button.how this.

once hide cannot view button.i need hide dropdown change function other time want show button.

code

<html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script src="http://code.jquery.com/jquery-1.7.2.js"></script> </head> <script type="text/javascript"> $(document).ready(function() { $("select").change(function(){ $("#myheader").hide(); }); }); </script> <body> <select id="header"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> <input type="button" id="myheader" style="width:20%;background-color:blue" /> </body> </html> 

try this:

$("select").focus(function(){ $("#myheader").hide(); }); $("select").blur(function(){ $("#myheader").show(); }); $("select").change(function(){ $(this).trigger('blur'); }); 

demo


Comments