show and hide

show and hide

Hi

 
T he input text box has a placeholder value and is inline with the select dropdown.
When i click on the select dropdown - and "inputone" is the selected option - input text box is there. Click on “optiontwo” and “optiontwo” is selected and then click AGAIN and “inputone” is hidden. Then wh en i click on "inputone" the input text box won't show.

< script >

    $ ( document ) .on ( "pagecreate" , "#pageone", function () {

           // Click on the select dropdown and the input text box is there      

           $ ( "#select" ) val ( "optionone" ) .on ( "tap" , function () {

 

                $ ( "#inputone" ) .show ();

             

     // Click on “optiontwo” and “optiontwo” is selected and then click again and “inputone” is hidden

            $ ( "#select" ) .val ( "optiontwo" ) .on ( "tap" , function () {

 

                $ ( "#inputone " ) .hide ();

             

     });

});

    });

      

 

</ script >
 
 
any help please?