Buttons don't work after submit or clicking link

Buttons don't work after submit or clicking link

Hi Forum,

i have a problem, i use the code attached.
After i load the page the buttons for power, plus and minus are working as expected, but after
i submitted the form or i clicked one of the "a href" buttons the power, plus and minus buttons 
are not working anymore.

Can anyone help me to solve this issue ?!

Thanks in advance !!!

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.  <meta name="apple-mobile-web-app-capable" content="yes" />
  5.  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  6.  
  7.  <title>LED-Control 2.0</title>
  8. <meta name="mobile-web-app-capable" content="yes">
  9. <meta name="viewport" content="width=device-width, initial-scale=1">
  10. <link rel="apple-touch-startup-image" href="http://192.168.2.1/LED/iphone.png">
  11. <link rel="apple-touch-icon" href="http://192.168.2.1/LED/custom-icon.png">
  12. <link rel="shortcut icon" href="http://192.168.2.1/LED/custom-icon.png">
  13. <link rel="stylesheet" href="http://127.0.0.1/jquery/jquery.mobile-1.4.5.min.css">
  14. <script src="http://127.0.0.1/jquery/jquery-1.11.3.min.js"></script>
  15. <script src="http://127.0.0.1/jquery/jquery.mobile-1.4.5.min.js"></script>
  16.     
  17.      <script type="text/javascript">
  18.     $(function () {
  19.         $("#btnQueryString0").bind("click", function () {
  20.             var url = "?red=0&green=0&blue=0&dimv=0";
  21.             window.location.href = url;
  22.         });
  23.     
  24.         $("#btnQueryString1").bind("click", function () {
  25.             var url = "?red=0&green=0&blue=0&dimv=10";
  26.             window.location.href = url;
  27.         });
  28.    
  29.         $("#btnQueryString2").bind("click", function () {
  30.             var url = "?red=0&green=0&blue=0&dimv=-10";
  31.             window.location.href = url;
  32.         });
  33.     });
  34.     </script> 



  35. </head>
  36. <body>

  37. <div data-role="page" id="seite01">
  38. <div data-role="header">

  39. <h1>LED-Control</h1>
  40. </div>
  41.    
  42.    
  43.    <div data-role="content">
  44.    
  45.    <p>
  46.    <center> 
  47.    <div data-role="controlgroup" data-type="horizontal" >
  48.    
  49.    <input type="button" id="btnQueryString0"  data-icon="power" data-iconpos="notext" value="Icon only">
  50.    <input type="button" id="btnQueryString1"  data-icon="plus" data-iconpos="notext" value="Icon only" >
  51.    <input type="button" id="btnQueryString2"  data-icon="minus" data-iconpos="notext" value="Icon only">
  52.    
  53.     </div>
  54.     </center>
  55.     </p>
  56.     
  57.    
  58.        
  59.     <p> 
  60.     <center>
  61.     <div data-role="controlgroup" data-type="horizontal">
  62.      <a href="?red=255&green=0&blue=0&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: red; color: red;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
  63. <a href="?red=0&green=255&blue=255&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: green; color: green;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
  64.      <a href="?red=0&green=0&blue=255&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: blue; color: blue;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
  65.     </div>
  66.     </center>
  67.     </p>
  68.     
  69.    
  70.     <p> 
  71.     <center>
  72.     <div data-role="controlgroup" data-type="horizontal">
  73.      <a href="?red=255&green=20&blue=0&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: rgb(255,150,0); color: red;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
  74. <a href="?red=0&green=150&blue=255&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: rgb(0,190,255); color: green;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
  75.      <a href="?red=255&green=255&blue=255&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: rgb(255,255,255); color: blue;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
  76.     </div>
  77.     </center>
  78.     </p>
  79.     
  80.   
  81.     
  82.     <p>
  83.    
  84.     
  85.     <form name="input" action="index.htm" method="get">
  86.  
  87.     <label for="slider-2">RED:</label>
  88.     <input type="range" name="red" id="slider-2"  data-highlight="true" min="0" max="255" value="$r" ><br>
  89.     <label for="slider-2">GREEN:</label>
  90.     <input type="range" name="green" id="slider-2" data-highlight="true" min="0" max="255" value="$g"><br>
  91.     <label for="slider-2">BLUE:</label>
  92.     <input type="range" name="blue" id="slider-2" data-highlight="true" min="0" max="255" value="$b" ><br>
  93.     <input type="hidden" name="dimv" value="0">
  94.     <button class="ui-shadow ui-btn ui-corner-all" type="submit" value="SET" id="submit-2">SET</button>
  95.    
  96.     </form>
  97.   
  98.     </p>


  99. </div><!-- /content -->
  100.    <div data-role="footer">

  101.      <h4>V 1.0</h4>
  102.    </div><!-- /footer -->
  103. </div><!-- /page -->


  104. <!-- </body> --></body>
  105. </html>