Note that there are some explanatory texts on larger screens.

plurals
  1. POButton and Slider customizing (Size, Position, Caption size) with Jquery
    primarykey
    data
    text
    <p>I have built a webinterface for my homeautomation bussystem using c, php and javascript. The function works fine, but I am having trouble in achieving the right styling for my buttons and sliders with JQuery.</p> <p>What I want to do is place buttons and sliders in on "row" next to each other and be able to size and style these to be used with a regular pc browser and with my iOS devices. </p> <ol> <li><p>The button sizing works fine for all my devices, but changing the button font-size withing the section does not have an effect on the font size when viewed from a iOS device. I helped myself around this problem by setting the font-size within the html body. Is there an obvious reason for this behaviour?</p></li> <li><p>Could somebody please point me to an example where there is a button in line with a slider and a numeric field that shows the slider value. Of course I have looked at the standard Jquery slider example but whatever combination of syntax I tried using classes to manipulate the styling I never came out with an inline slider the size, position (inline) and label that I wanted.</p></li> </ol> <p>Below is my code as a reference. I played with Arduinos and a Raspberry coding in c++ but obviously I am more or less without any html or javascript experience, so I would really appreciate your help!</p> <pre><code>&lt;!doctype html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Wipperaller&lt;/title&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"&gt; &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt; &lt;style&gt; body{background-color:white;} button{ width: 180px; height: 90px; font-size: 50px; padding-top: 5px; padding-bottom: 5px; }; myslider{ width: 1em; height: 1em; cursor: default;} &lt;/style&gt; &lt;script&gt; function handlerName(busCommand) { alert(busCommand.data.msg); } function SendBusCommand(inputData) { $.ajax({ type: "POST", url: "socketclient_01.php", data: inputData.data, cache: false, success: function(html){ $("#results").append(html); // hier wird dann der inhalt, // den deine datei ausgibt, //in das element mit der id results eingetragen } }); } $(document).ready(function(){ $("button").button(); $("#SZToggle").bind("click", {destination: "11130", com: 0x35, param1: 0x00, param2: 0x00}, SendBusCommand); $("#SZAn").bind("click", {destination: "11130", com: 0x32, param1: 0x64, param2: 0x00}, SendBusCommand); $("#SZAus").bind("click", {destination: "11130", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); $("#SZKabuff").bind("click", {destination: "10206", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); $("#WZToggle").bind("click", {destination: "10106", com: 0x35, param1: 0x00, param2: 0x00}, SendBusCommand); $("#WZWToggle").bind("click", {destination: "10102", com: 0x35, param1: 0x00, param2: 0x00}, SendBusCommand); $("#EZToggle").bind("click", {destination: "11030", com: 0x35, param1: 0x00, param2: 0x00}, SendBusCommand); $("#EZAn").bind("click", {destination: "11030", com: 0x32, param1: 0x64, param2: 0x00}, SendBusCommand); $("#EZAus").bind("click", {destination: "11030", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); $("#EGAus").bind("click", {destination: "32872", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); $("#OGAus").bind("click", {destination: "32882", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); $("#AllesAus").bind("click", {destination: "32868", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); $("#KuToggle").bind("click", {destination: "10104", com: 0x35, param1: 0x00, param2: 0x00}, SendBusCommand); $("#AUELicht").bind("click", {destination: "10403", com: 0x35, param1: 0x00, param2: 0x00}, SendBusCommand); $("#AUTLicht").bind("click", {destination: "10404", com: 0x35, param1: 0x00, param2: 0x00}, SendBusCommand); $("#AUSteck").bind("click", {destination: "10405", com: 0x35, param1: 0x00, param2: 0x00}, SendBusCommand); $("#BADSLicht").bind("click", {destination: "10205", com: 0x35, param1: 0x00, param2: 0x00}, SendBusCommand); $("#BADDLicht").bind("click", {destination: "10302", com: 0x35, param1: 0x00, param2: 0x00}, SendBusCommand); $("#AlleAuf").bind("click", {destination: "32968", com: 0x32, param1: 0x64, param2: 0x00}, SendBusCommand); $("#AlleZu").bind("click", {destination: "32968", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); $("#EGAuf").bind("click", {destination: "32970", com: 0x32, param1: 0x64, param2: 0x00}, SendBusCommand); $("#EGZu").bind("click", {destination: "32970", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); $("#EGAuf").bind("click", {destination: "32972", com: 0x32, param1: 0x64, param2: 0x00}, SendBusCommand); $("#EGZu").bind("click", {destination: "32972", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); $("#WZJalFrontAuf").bind("click", {destination: "32974", com: 0x32, param1: 0x64, param2: 0x00}, SendBusCommand); $("#WZJalFrontZu").bind("click", {destination: "32974", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); $("#WZJalSeiteAuf").bind("click", {destination: "32974", com: 0x32, param1: 0x64, param2: 0x00}, SendBusCommand); $("#WZJalSeiteZu").bind("click", {destination: "32974", com: 0x32, param1: 0x00, param2: 0x00}, SendBusCommand); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="gobalwrapper" style="font-size:24px"&gt; &lt;h1&gt;Bus Webfrontend&lt;/h1&gt; &lt;p class="buttons"&gt; &lt;h2&gt;Licht Gesamt&lt;/h2&gt; &lt;button id="EGAus"&gt;EG Aus&lt;/button&gt; &lt;button id="OGAus"&gt;OG Aus&lt;/button&gt; &lt;button id="AllesAus"&gt;Alles Aus&lt;/button&gt; &lt;/p&gt; &lt;p class="buttons"&gt; &lt;td&gt;&lt;h2&gt;Jalousie Gesamt&lt;/h2&gt;&lt;/td&gt; &lt;td&gt;&lt;button id="AlleZu"&gt;Alle Zu&lt;/button&gt;&lt;/td&gt; &lt;td&gt;&lt;button id="EGZu"&gt;EG Zu&lt;/button&gt;&lt;/td&gt; &lt;td&gt;&lt;button id="OGZu"&gt;OG Zu&lt;/button&gt;&lt;/td&gt; &lt;/p&gt; &lt;p class="buttons"&gt; &lt;td&gt;&lt;button id="AlleAuf"&gt;Alle Auf&lt;/button&gt;&lt;/td&gt; &lt;td&gt;&lt;button id="EGAuf"&gt;EG Auf&lt;/button&gt;&lt;/td&gt; &lt;td&gt;&lt;button id="OGAuf"&gt;OG Auf&lt;/button&gt;&lt;/td&gt; &lt;/p&gt; &lt;p class="buttons"&gt; &lt;h2&gt;Licht Wohnzimmer&lt;/h2&gt; &lt;button id="WZToggle"&gt;Fluter&lt;/button&gt; &lt;button id="WZWToggle"&gt;Wand&lt;/button&gt; &lt;/p&gt; &lt;p class="buttons"&gt; &lt;button id="WZJalFrontZu"&gt;Front Zu&lt;/button&gt; &lt;button id="WZJalSeiteZu"&gt;Erker Zu&lt;/button&gt; &lt;/p&gt; &lt;p class="buttons"&gt; &lt;button id="WZJalFrontAuf"&gt;Front Auf&lt;/button&gt; &lt;button id="WZJalSeiteAuf"&gt;Erker Auf&lt;/button&gt; &lt;/p&gt; &lt;p class="buttons"&gt; &lt;h2&gt;Esszimmer&lt;/h2&gt; &lt;button id="EZToggle"&gt;Licht&lt;/button&gt; &lt;button id="EZAn"&gt;An&lt;/button&gt; &lt;button id="EZAus"&gt;Aus&lt;/button&gt; &lt;/p&gt; &lt;p class="buttons"&gt; &lt;h2&gt;Küche&lt;/h2&gt; &lt;button id="KuToggle"&gt;Licht&lt;/button&gt; &lt;/p&gt; &lt;p class="buttons"&gt; &lt;h2&gt;Schlafzimmer&lt;/h2&gt; &lt;button id="SZToggle"&gt;Licht&lt;/button&gt; &lt;button id="SZAn"&gt;An&lt;/button&gt; &lt;button id="SZAus"&gt;Aus&lt;/button&gt; &lt;button id="SZKabuff"&gt;Kabuff Aus&lt;/button&gt; &lt;input type="range" class="myslider" name="slider-1" id="slider-1" value="60" min="0" max="100" /&gt; &lt;/p&gt; &lt;p class="buttons"&gt; &lt;h2&gt;Bad&lt;/h2&gt; &lt;button id="BADDLicht"&gt;Licht&lt;/button&gt; &lt;button id="BADSLicht"&gt;Spiegel&lt;/button&gt; &lt;/p&gt; &lt;p class="buttons"&gt; &lt;h2&gt;Außen&lt;/h2&gt; &lt;button id="AUELicht"&gt;Eingang&lt;/button&gt; &lt;button id="AUTLicht"&gt;Terasse&lt;/button&gt; &lt;button id="AUSteck"&gt;Steckdose&lt;/button&gt; &lt;/p&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload