Default State for Slider Button
I have created a simple slider that will toggle the state of my home heating system. The page uses ajax to call a php script that in turn writes a iether '1' or '0' to an html file. An arduino development board then reads this html file periodically to check the state and, if it differs from its localy stored state, toggles the home heating system using a relay. What i need to do now is to get the state of the slider in a newly loaded page to match the boolean in the html file. In a regular HMTL
virtual keyboard - enabled - disabled it
Hi. I'm using a virtual keyboard (http://mottie.github.com/Keyboard/). I have a checkbox that sould control if the virtual keyboard show be displayed or not. the thing is that i'm not understand on how to disabled it. i try to unbind it but doesn't work... any help? <script type="text/javascript"> $(function () { //show login $("#showLogin").on({ click: function () { $("#loginFormDiv").toggle("slow"); } }); $("#cb_showVKey").on('click',
Where is the button for submitting a translation?
On this page: http://docs.jquery.com/How_jQuery_Works it says on the bottom: If you have translated this article or have some similar one on your blog post a link here. Please mark Full Translated articles with (t) and similar ones with (s). 1. On my computer, the "here" word is not clickable. How can I submit a (Romanian) translation of that article? 2. Is it okay if I also use that code to create a video, for users to see the demo in action? If yes, may I post that video on YouTube? Thank you,
JQuery Ajax data - how to send a "object in object" to JSON server?
Hello to all, i have a problem to send a "object in object" as json ajax data to a webservice. My jquery code: $.ajax({ type: "POST", url: "http://localhostl/webservice/service.php?JSON", data: { "call" : "IsSessionValid", "request" : [{ "apiRequestHeader" : { "sessionToken" : "XXXXXXXXXXXXXXXXXXXXXXXXXX" } }] }, success: function(data){alert("OK: " + data);}, failure: function(errMsg) {
How to only send Ajax requests
Hey, I am working on a little mobile site for my own home-built home automation system. Essentially I'd like to have a bunch of listviews that, when tapped, send an Ajax request to a server and does not load in any data or create a new page. This is so I can send TV remote control commands, turns lights on and off, set AC, etc. Snippet of code of the listview: <li data-theme="c"> <a href="#page1" data-transition="slide" id="lightsOff">
JQuery Ajax - Hide the calls from console.
Hello, Well, I'm making many calls using Ajax, and every time that i open Google Chrome's console it display many calls. How i can hide the calls from the console? Leave it empty? Sorry for my english, i use google translate to translate.
Issue with slider menu and smooth scroll
When "contact" is selected, the page scrolls down, but the slider only moves to "services" http://mlfoxdesigns.com/ - Only happens occasionally - Happens most frequently with IE9 and Firefox (of course) but happens with chrome as well. - Contact tab is the only tab with the issue Willing to offer design work in exchange for help (small logo, etc. see my website portfolio) Thanks!
HTML as text into accessable HTML tree
Hello. Once again. I get a server respond and this could be a HTML document. If this is the case, jQuery will give me the result as a string. I need to convert it into a DOM, to access the single nodes in it. Does somebody know a solution? I really need the function getElementById. I hope some of you guys can help me!
Padding style of UI theme on my page seems different to theme example
Hi, I have downloaded a UI Theme, when using this on a web page the whole thing 'calendar, button, menus' all seem to have larger text and quite a bit of padding than on the jQuery UI Theme page. I found a post where there someone seemed to have a similar problem so I tried using their fix: $("#menu").css("padding","0"); This didn't work and only seemed to add to the problem in other ways so my issue was obviously not the issue the other user had. I have attached a couple of images of how a menu
closest index
I want to get order of li that clicked, but output is -1 . but i want to click any img if it is first of "ul" it alerts 1, if it is second of "ul" it alerts 2? <ul class="w1m"> <li>boston</li> <li>dallas</li> <ul> <li><img src='img/minussub.png' /></li> <li><img src='img/minussub.png' /></li> </ul> </ul> $("li").on("dblclick","img[src='img/minussub.png']", function() { alert($(this).closest('ul.w1m').children('ul').index('ul.w1m > ul > li')); });
Problem regarding page caching
Hello everybody, first of all, please be aware, that I read (and tried) nearly everything what google found concerning this topic, but I am still clueless. I am currently using jquery 1.8.2 and jQM 1.2.0 (but had the same issue with 1.1.0.). Here is the shortened, simplified code of my problem: http://jsfiddle.net/CkuMg/ I am developing a page which firstly generates a list, filled with data received from a webservice. This works so far as planned. Every item of the list should navigate to another
jquery ajax call in apache
I am trying a simple Ajax call from HTML file but i could nt get it it is coming into "success" but no data on it $("#btnAjax").click(function () { $("#dvAjax").html(ajax_load); $.ajax({ type : "GET", url : "http://www.smartcloudlearning.mobi/SmartCloudLearningMobi/rest/resource/getResourceTypes", contentType: "application/json", // content type sent to
Looking for a plugin for seperate words in a inputfield
Hi, does anybody know a jQuery plugin through this I can delete words which are seperated from space an who are in a searchfield? Take a look to my attached image to see what I mean. BR
jQuery prependTo function not working as expected
Hello Everyone: I am doing an exercise using prependTo function. instead of appending before the paragraph in the HTML body. The text appeared on a separate line. Could you explain to me how appendTo and prependTo works, so I understood its behavior. Thanks! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>hello world</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
jquery custom scroll path
Any one know about jquery custom scroll path. i want to study it. need good tutorial for me. please help me. i want to create like this website, can you help me to study it, http://joelb.me/scrollpath/ Thank you.
Get destination of a redirect
Hi, I'd like to embed videos in one of my page using a bit of jquery. In my page, I've got the url of the video (like http://www.canal-u.tv/?redirectVideo=10349 ) When you use it, this url is redirected to a longer url : http://www.canal-u.tv/video/cinematheque_francaise/dialogue_avec_jean_louis_trintignant.10349 To embed the video I just need to append the following parameters to the url : width=550&height=340 The problem is that I need to append this parameters to the long url, so I need to know,
.replace method not consistent
The function prepVerse is bound to an event handler "onchange" for a textarea and this works fine. Any time there is any change to the textarea the function reads the textarea into an array. The code steps through the array and: 1. removes blank and null lines. 2. strips line number 3. assigns new line number 4.append \n to end of line 5.appends current line to outBuffer 6. outBuffer moved back to textarea. On the first iteration the works fine, however the next iteration outbuffer is blank. if
Few little problems
I added to my page jQuery Mobile framework and I have a few problems.. The background color was changed to gray color. It adds to the text in my page a gray shadow. If i hover over a text in my page the mouse cursor is not changin the the text cursor for some reason..How can fix that?
Problem sending a form via a confirmation dialog.
Hi. I want to send a form to the button plusar presented by a confirmation dialog in jQuery. The problem I pick well hidden variables but not the one that comes in the submit button type. Can you help? I'm blocked. Thanks and best regards. This is mi complete example sample code: <?php $cmd = $_REQUEST['cmd']; $res = $_REQUEST['res']; echo "PARAM=$cmd"; echo "<br>"; echo "RES=$res"; echo "<br>"; echo "<br>"; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Forms in ui Dialog</title>
button link jquery mobile not working
hi all Im new whit jquery mobile I have a php site whit mysql db now do I want use jquery mobile So I have make a index.php whit a menu its works nice, but my url is olso index.php and click I on welkom button than is the url index.php?id=1 and if I click on contact whit the url index.php?id=2 and so more. Now the problem is that if I wanna go to welkom than nothings happening. Sorry about my engels
I have a problem and I am not sure if I can do it with jquery
Ok, I have a project where I have to load 2 different pages with JavaScript within each other whilst still being able to control all 3 pages from any given page. So I have index that has a child page loaded into it then into that another page, I need to post a form that is in the 2nd child page from the first child via a link and I need to be able to control the url of the first child page with both the index and the 2nd child page. I am new to Jquery and I am not only confusing myself but probably
jQuery UI Options via data- attributes
Note, all code here is untested and for illustrative purposes. Recently I stumbled upon a small problem. I spent some time and came up with a workaround, but I'm fairly certain that there must be a better way. Basically, I want to do this in my $(document).ready() $('.accordion').each(function() { var settings={collapsible:true,active:false}; if($(this).data('settings')) { $.extend(true, settings, $.parseJSON($(this).data('settings'))); } $(this).accordion(settings); }); With
How do I restrict the element search of a image on a single div?
My question is, how do I look for all pictures in a div (I want to go through all of them with $.each). How do i do that?
Size of a not yet loaded picture
How can I get the size of an not yet loaded picture? Loading it would be a possibility, but I don't want to / cannot wait for every picture to complete loading. I just want to have the size! And could i possibly force all pictures to load their metadata?
same kind of elements in closest api
$("ul").on("dblclick","img[src='img/arrowdown.png']",function(){ alert($(this).closest('ul.w1m > ul').length); }); output is 0, but there is one "ul" in other "ul.w1m" why output is not 1? <ul class="w1m"> <li><div><img src="img/minus.png"><img src="img/arrowdown.png"><img src="img/link.png"></div><div id="wu1m2" contenteditable="true" class="w1mc">b</div> </li> <ul> <li><div><img src="img/minussub.png"><img src="img/link.png"></div><div id="wu1s0m2" class="w1smc" contenteditable="true">Websites</div>
Differ XML and HTML from AJAX request
Hello! I'm totally new to the AJAX function of jQuery. I'm about to develop a dynamic page. But the problem is, that I'm sending a request and the answer could be a HTML or a XML document. There is absolutley now way, that I can dicide what type the server is sending me! So I was looking for a way, to decide whether the answer is a XML or a HTML document. What I'd like to have too, is the possibility, when I have a HTML document as answer, that I can access the nodes and stuff like my current DOM.
NOT A JQ question but I hope some one can help!
I am able to see all gif - swf's jpeg and flv videos which I place on my web page providing I look at the actual html page where the info has been paced. When I try to view it in my home page on the DW program I get the following message: Flash player GET THE LATEST VERSION! I did that loded the latest version but still no picture or video visible in the DW program. By itself one by one page viewing in the browser no problem but not in the home page. Any Ides why??? Hope some one has a similar
I want to find the heights of my columns after images load.
I have a page with three columns. I have the following code: $(document).ready(function(){ var left = $('#left_sidebar').height(); var right = $('#right_sidebar').height(); var center = $('#content').height(); }); The 3 variables give me the heights of the columns before all images are loaded. Is there a way to find the heights AFTER the images load? thanks, mike
Image Cropping with focus
Hi, I am looking for a certain plugin, I don't know, if one exists that way. Here's what I expect it to be able to: take an image from the DOM find important portions of that image using any technique Crop/Center the image to the portion found in step 2. Finding important portions means to me, that th script automatically should determine, which portion will probably be of interest to a viewer. It may use an entropy algorithm, or any similar and effective method. I do not need any uploading capabilities,
Set a checkbox to unchecked if a Checkbox or Radio button isn't checked, when specifying by name and value
I need to set a checkbox to be either checked or unchecked based on whether specific Checkboxes or Radio button are selected. I know how how to do this for checkboxes when I specify an id # for each element and use if ($(this).attr('checked'), but I can't get it to uncheck when I specify the names and values of the checkboxes instead. I also haven't been able to get it to uncheck when a radio button is unchecked, even when I specify an id # for each element and use if ($(this).attr('checked'). Ideally,
blur after mousedown
Is it reliable to assume than blur always fired before mousedown? I am developing a datepicker. I need it not to close when a user clickes on a date. (UI does not fit my needs.)
Ajax - How do I make it lighter?
Hello, I need make multiple queries using Ajax, but every time that i do it the document is slow, how do i avoid this? Sorry for my english!
HTML5 Image upload with javascript and php
I want to multi-upload images to a database using javascript and php (html5), but I have problem with it, my code is just uploading one image, which is the latest photo selected and not all. How can fix this problem and what do I have to do? I use developer mozilla html5: Here You can test my code by selecting multi images and clicking on button Upload Image to see the result. DEMO FROM MY FULL CODDE My js code: function doClick() { var el = document.getElementById("fileElem"); if (el) {
Recursive dialog window and mystery error message
I'm training myself on jQueryMobile and using dialog windows for form submission The form itself is being submitting via AJAX and when there is a problem with the logon attempt the response kicks in an alert with the error message. While the submission technically works I'm running into three problems. The first is that when a user successfully logs on jQueryMobile itself flashes an error dialog momentarily and then proceeds as normal. The second being that when an error alert is kicked in, the alert
Hide/Show nextAll TR when Click in TH (without affecting subtables into table td)
Hello from México, my english isn't very good, sorry. I need this... <style> *{height:20px;width:100%} table {;background:#999999;<--border-collapse:collapse-->} th {background:#aaaaaa} td {background:#bbbbbb} </style> <table> <tr> <th> Principal Item <--- show/hide all next TR:gt(0) except in subtable </th> </tr> <tr> <td> Information... </td> </tr> <tr> <td> Information... </td> </tr> <tr> <td> <table> <tr>
run function after get API ends
creatediv.html creates new <p> into "newdiv". but output is always 0 $.get('creatediv.html', function(data) { $('#newdiv').append(data);}, 'html'); alert($('p').length); ////////////////////////////////////////////////////////////////////////////////////////////////////////////// if write like this output is 1: $.get('creatediv.html', function(data) { $('#newdiv').append(data);}, 'html'); setTimeout("plength();",1000); function plength() { alert($('p').length); }
How would I access Multiple records inside JSON
How would I access Multiple records inside JSON This sample only works if i have one record. Thanks to POPNoodles for helping me so far <script type="text/javascript"> $(function(){ $('#email').blur(function() { var email = $('#email').val(); $.ajax({ type: 'POST', url: "searchdb3.php", data: {email: email}, dataType: 'JSON',
$ undefined error
I am getting a "Microsoft JScript runtime error: '$' is undefined." Both files (jquery.tools.min.js & jquery.corner.js) have been included in the project. Any thoughts? <script type="text/javascript" src="Scripts/jquery.tools.min.js"></script> <!--[if lte IE 9]> <script type="text/javascript" src="Scripts/jquery.corner.js"></script> <script type="text/javascript"> $("input[type='button'],input[type='submit'],input[type='reset']").corner(); </script> <![endif]-->
Firefox 16.2 conflict with disableSelection
I have a code like below in ready function $('DIV').disableSelection(); which is causing all the dropdowns to become inactive in Firefox 16.2 onwards. It works perfectly fine in every other browser including Firefox upto 16.1. I have reported this to Firefox also here: https://bugzilla.mozilla.org/show_bug.cgi?id=805516 Any clues why this is being blocked in Firefox 16.2?
Link glow for JQuery 1.6.4
Does anyone know how to make links fade in a glow when the mouse hovers over it, but for JQuery 1.6.4? I know the newest version is 1.8.x, but that version for some reason breaks my website's preloader, and I'm too tired to figure out why it doesn't want to work with 1.8.x, so I'm stuck with 1.6.4, which isn't too old I think. I've googled all over the place and found a few tutorials on link glows (JQuery-color, JQuery-color-animation, etc), but all of these only work for JQuery 1.2.x or 1.8.x after
Next Page