How to operate on the result set of .find?
The following code does not work, but I cannot figure out why. Nothing is even saved to console, soI do not know how to debug it. $('li').find('#important_item').each(function() { $(this).css({ 'border': '1px solid blue' }); console.log(this); console.log($(this)); }); Secondly, Do I have to use .each to operate the result of .find? Or is there a way to include an anonymous function directly in .find? (example: $('li').find('#important_list_item_1', function() { // function
Searching for led-type gauge
Hello, I'm searching for a plugin that can be used to create a gauge that resembles the one on the left-side of this image (the one that starts with green at the bottom, and gets red at the top): I have searched a lot already, but I cannot seem to find one that comes close to this one... Can anybody help?
apple-touch-icon does not seem to work with IOS 8
Using <link rel="apple-touch-icon" href="hs-icon.png"/> so I can save on the home screen a custom icon does not seem to be working on the iphone running ios version 8. If there a different syntax to use this feature on an phone running ios version 8 ? Thanks so much for any help.
This function is not working with jquery 1.11.1.js
$(function () { $("[id*=treeviwExample] input[type=checkbox]").bind("click", function (e) { var table = $(this).closest("table"); if (table.next().length > 0 && table.next()[0].tagName == "DIV") { //Is Parent CheckBox var childDiv = table.next(); var isChecked = $(this).is(":checked"); $("input[type=checkbox]", childDiv).each(function () { if (isChecked) {
JQuery Mobile
Hi Guys am new to JQuery, am trying to use JQuery Mobile to send entered fields/data from an HTML5/PHP mobi site form to a dashboard which should store the values from that form. what i want to achieve is the link which contains the values entered on the from. Please help, thanks in advance!!!!
Page content disappears when .slideToggle has been used to close div.
Hey jQuery forums, I had a problem what occurs only on Android phones using the Chrome browser. Info: jQuery version: 2.1.3. I have a 2 divs that are below eachother you click the top one and the lower one closes: <div id='homeExtenter'> <div class='menuItem'> <div class="menuHeader">Menu Header</div> <div class='menuItems'> <ul> <a><li>Item 1</li></a> <a><li>Item 2</li></a>
wait cursor in the modal form
I am using the jquery modal form for popups throughout my very large application. Some of saves can take awhile so I need to have the spinning wheel to tell the users the system is working on it. Everywhere else in the application the cursor changes to the wheel while processing I just can't get it to show while the popup is open. If I remove the code to change the cursor back to default it does show the wheel after the popup closes. Is there a setting specifically for the poppup to handle the spinning
Refactor jquery code
Dear jquery people, I've built a simple application. (<- jsFiddle) I noticed that this application has no support for mobile devices. At least if I try to execute the program on iOS or Android, it is not possible to manipulate elements. I did some research and concluded that it could be done if I included jquery-mobile.js. However, after done so, nothing changed. So, I am afraid I need to refactor all code now, so it will be mobile-device compatible. My question is: is my conclusion right? Kind regards,
jQuery.ajax() vs. loadXML
Hi, I have the following code: myGrid.loadXML (myUrl, function () { console.log (myGrid.getRowsNum ()); }); and it is working well (I will see the number of rows of the grid on the console). But I replaced the following code with this: $.ajax({ type: "POST", url: myUrl, dataType: "text", success: function(result) { myGrid.parse(result); console.log (myGrid.getRowsNum ()); } }); and the result is 0. Why? Function parse() should be synchronous,
Dragging and Dropping multiple td at a single instance from one tr to another
Hello, Currently working on dragging and dropping of td in table using jquery ui. There are 3 columns and 3 rows in table. 1. In 1st case, In Last column if we drag any cell and drop it in same column it can be clone and drop in same column by creating new row and rowspan with other td in above tr 2. In 2nd case , If drag cell from 2nd column then it will drag that cell and right closest cell by cloning and drop by creating new row and rowspan with other td in above tr. 3. In 3rd case , If drag
datepicker shows calendar before date field has focus
Using these versions: //code.jquery.com/jquery-1.10.2.min.js jquery-ui-1.11.2.custom/jquery-ui.min.js When my form loads, I get a static calendar (clicking has no effect), and when I click in the date field, I get a usable calendar. after getting focus: My code is <input type =" text " name =" dateObs " id =" dateObs " class =" date-pick " value =" " /> $(document).ready(function() { $.datepicker.setDefaults( { showOn: "focus", dateFormat: "yy-mm-dd" }); $(".date-pick").datepicker(); }); Any idea
JQUI Widget Factory: data- overrides passed options, or passed options overrides data- ?
In a widget using jQuery UI Widget Factory, sometimes options can be set with data- attributes. It's common in jQuery Mobile. I don't think there is really any standard for this, though? In jquery.mobile.iscrollview, I let the user override options by setting a JSON string in the data-iscroll attribute in the HTML. e.g.: <div data-iscroll='{"scrollbars":false,"useTransform":true}'> I think that the use of a JSON string here is actually either unprecedented or at least uncommon. It's certainly
Widget Factory - Leaving option keys undefined?
In a jQuery UI Widget Factory widget, is it considered "kosher" to leave option keys undefined? Or must every option key be defined? It would produce different results when you check an option that might have a boolean value. If the key is defined, then it will return false. If the key is not defined, it would return undefined. For a simple boolean test, it would not make any difference. But I do not know what code or common practice may lurk that might test for an explicit value of false. I suppose
Slow Loading Slider
Hello everyone. I'm hoping someone can help...i've got a slider on my front page here: celtics247.com The response is really slow, not sure if there is something I can do to improve the performance time. Thanks!
Pass datepicker value to PHP & MySQL
Hi, I have the attached new_leave.php file which has dateFrom and dateTo datepickers. When submitting the form I don't get the correct MySQL format therefore it's throwing an error. The value I get is something like this: 1423900800 that's when I try: echo $timestamp = strtotime($_POST['dateFrom']); can you help please...
In popup not work
Hello friends , it is my first query on the forum . I use JQueryMobile to organize information in html in local and in a disinterested way . I have found that in the latest version ; 1º.- in 1.4.5 , a popup will not open within another popup . 2.- in a popup , a hidden link by the size of the screen does not work
Getting ajax to redirect on success
I'm using laravel 4 and in order to save an image I used some ajax code. For my site I need to redirect when the submit button is clicked. The page that it needs to redirect to is index.blade.php Here is my ajax code $.ajax({ type: 'POST', url: $(this).attr('action'), data: $(this).serialize(), dataType: 'json', encode : true, success: function(response) { location.href('admin/test'); } });
mystery function in unslider.js
hey guys , i have been trying to look up the code of a plugin called unveil.js , basically , i have this one line , which i am struggling to figure out in the plugin , look below : $.isFunction(o.starting) && ! callback && o.starting(el, li.eq(current)); The line above can also be found on the git repo of the plugin : git repo unslider.js now i figured out the above line , is nothing but a sequence of if conditions , something like below : so , 1st $.isFunction(o.starting) is checked , if true
validation plugin
Hi there! I am trying to change our forms to the jquery validation plugin. But I don't get it run and I don't know why. Is it because of using jquery mobile? This code don't work for me. The field versicherungsbeginn receive no error-label and no error-class. $(document).ready(function () { $("#ABSCHLUSS").validate({ rules: { versicherungsbeginn: { required: true, minlength: 10 } }, messages: { versicherungsbeginn:
Jquery File Upload Controller Not attaching the file
Hi, Using jquery fileupload control, I am trying to attach files. I written below piece of code. When I run the application, it is displaying browse button for attaching files. My requirement is when I attach the filesAnd click on the browse button, data should be posted to the API controller mentioned under URL section in the below code. But right now it is not processing attached file and also it is not calling API controller. I am testing this application in IE. < body > < script src ="../../Scripts/jquery-1.8.2.min.js"></
How to avoid duplicate clones in drag and drop
I am doing a simple project using Jquery UI. The program is similar to shopping cart where you drag items from one container/table list to another. I am almost there but I could not figure how to avoid duplicates on second container. For example, I dragged item A from left to right. I can dragged that item A and it makes clone forever on the second container. I just want one clone of item A in second container. If the user tries to drag item A to second container where clone of item A is already
Install jquery mobile
How to install jquery mobile in Ubuntu 12.04? I have install jquery in ubuntu and I am not sure if that is suffice to start developing apps I am very much a newbie in this area, so any step by step pointers on what needs to be done will be helpful Thanks
complex not(!) conditions
Hey guys , can you checkout the below if conditions , they make extendsive use of the not operator and i am a little confused as to what really are they checking for : Example One : if ((!target.length || index < 0) && o.loop == f) { // do somethng } i really don't understand this not operator , under what circumstance would the below condition : !target.length return true or false ?? if (!ul.queue('fx').length) { // do something } under what circumstance would the above condition return
PHP table isn't displaying
I have a PHP script which connects to a MySQL database and should output a table in HTML. I have tired to set up a long-polling AJAX script to poll my PHP script every second. It seems to work based on what I can see in my browser debugger, however the table isn't showing on the page. Can anybody help me find what's wrong with my code? reocrd.php <?php header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); flush(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD
NS_ERROR_NOT_AVAILABLE: prompt aborted by user, nsPrompter.js:426
Im getting this error in Firefox i googled it but i didnt get exact solution. I think the error is in this piece of code CODE:- $(window).load(function(){ if(localStorage.getItem('verify')=='\1'){ if(localStorage.getItem('claim') == '\0'){ if(localStorage.getItem('delete') == '\0'){ $.post("sample.php",{RegID:localStorage.getItem('Id'),Token:localStorage.getItem('token')},function(data){ $('.name>p').html(data.Name); $('.rate_div>p').html(data.Rate); $('.cover').css('background-image', 'url('+ data.Pic+')');
problems with a switch case from a select in my ui dialog title
Hey, this is my code : http://jsfiddle.net/vc7wrsk9/1/ it isnt working in jfiddle, i downt know why. But the code is working on my system. Like i said, im using a drop down list ( select ) in my ui Dialog title. And when i try to connect the values from the select with a switch case , it does nothing. So, when i change the select from the 1st value to the 2nd in the title, it even doesnt trigger the alert i put in there. any idea ?
autocomplete with header give null reference when scrolling with mouse
I'm using an autocomplete with jquery 1.11.1 and ui of 1.11.2. In our autocomplete I have this code }). data ( 'ui-autocomplete' ). _renderItem = function ( ul , item ) { return $ ( '<li>' ) . data ( "item.autocomplete" , item ) . append ( "<a style='float:left; font-size:10px'><div class='divUIMultiColumn' style='width:100px'>" + item . firstname + "</div><div class='divUIMultiColumn' style='width:150px'>" + item . lastname + "</div>" + "<div class='divUIMultiColumn' style='width:50px'> " + item
Looking for less recursive way to change a channel name across multiple buttons
Wordpress site and running at clanaod.tv The script below is changing my iframe srcs on click of any of the buttons , what I'm trying to do is create an automated way to quickly add new channels through a list rather than individual lines In other words I'm trying to find a way in which I can add ClanAODTV through a submission form to a list and it will create and autofill the url Variables ClanAODTV Silencer77 NewColossus <a href="javascript:twoFrameChange('http://twitch.tv/ variable/embed','http://twitch.tv/chat/embed?channel=
Grid Accordion Text
Is there anything out there that is an accordion but when you click it, it shows more than one sub level? For example:
jquery text resizer does not work :(
Hey :) I'm begginer in juery and I'm trying to add icons increasing and decreasing text. I found the code in net, but it does not work properly, because after one click on icon increasing font, text decrease, but it works fine later. Demo is here: http://www.queness.com/post/3956/quick-and-easy-jquery-font-resizer-tutorial Tips under the article does not work The code is: <script type="text/javascript"> $(document).ready(function () { //min font size var min=9; //max font size var
JQuery UI Sortable to generate a live preview
Hi everybody - hope some you can help me out here :) I'm trying to archive the following: I have a list of items that I can order with .sortable(). I would then like to make the sorting order get reflected (without having to reload the page) in a preview area. I've gathered and array of the new sorting order, but I can't find a clever way to do this. My plan is to also have different events attached to the div elements which I'm afraid will get lost if I just store the jQuery objects in an array
Workaround for break in IE10-11 cross domain Patch support
jQuery versions 1.6.0 - 1.10.2 provided support for making cross domain Patch requests in IE10 and IE11 using the jQuery.ajax() method (assuming all client and server settings are configured correctly for CORS). That support broke beginning with jQuery 1.11.1-rc1. A properly configured ajax request in IE10/11 now fails with "Error: Could not complete the operation due to error 8070000c." Stepping through the relevant jQuery code shows the underlying error being thrown as -2146828218, "Permission
Colon in Ajax jQuery data
The code below uses jQuery to gather data from a form and sends it to a PHP script. I have noticed that if one of the variables (variable1, variable2, variable3) contain the ":" (colon) character then this causes problems with the jQuery script and the PHP script won't get the correct input. Is this a known problem? How do I solve this? Are there more characters besides ":" that causes problems? var variable1 = $('#variable1').val(); var variable2 = $('#variable2').val(); var variable3 = $('#variable3').val();
Remote tabs using ajax - which page's CCS takes precedence?
This arguably is a CSS or Ajax question but I suspect most of the pratical implementation experience is here on this forum. I am loading web pages dynamically into tab panels and seeing very strange CSS behaviour. Does the CSS on the parent page control the rendering of the tab contents or the CSS which is loaded into the panel via $.load()? Thanks in advance!
debugging Jquery
Hey guys i have been just trying to debug a few javascript plugins and i'd really like to learn the mozilla debugger tool . here is a screen shot of what i had when i was debugging my plugin : on the left hand side you have all the events and on the right hand side u'll see DOM2 and bubbling , can somebody give me a vague idea of what this really means ?? and how useful are these options while debugging .. ? Thank you .
Change content from ABC to XYZ inside a span
I have this : <span class="additional-background"><span class="menu-item-text">ABC</span><span class="ms-hidden">Currently selected</span></span> inside some div structure. Can i change the content from ABC to XYZ using JQuery. Thanks
clicking near the footer moves
Good day, I would have a problem with the footer of this mobile site I'm developing, I can not keep the footer fixed, despite I gave in DIV the page in question is this http://www.mobigio.com/audioguide/test/index.php?f=1 the code of the footer is this <div data-role="footer" id='footer' class="ui-bar " data-position="fixed"> <div class="mobigio-logo" style='float:left'> <a href='http://www.mobigio.com' target='_blank'><img src='img/mobigio.png' ></a>
Dynamically created checkbox value serialization
I have a form where rows are added to a table when they are chosen out of another table. I append like so var html ='<tr><td><input type="checkbox" value="false"><td><tr>' That is short form, I also added a hidden input in there because I am using MVC. So now the checkbox is added to the form unchecked, which is the intent. If I jquery.serialize the form, the checkbox value is not shown, only hidden input shows as false. So far so good... When I check the checkbox, 2 values are serialized, false
Infinite list: after “Go back” to the list, the new elements are not there any more. How to restore them?
Im using AJAX to make an infinite list of elements (products). When I go to another page far from the list, and then "Go back" using the browser to the list page, the products added while scrolling down are not anymore there.. My question: after "Go back", how to show the products again (even those added while scrolling down)? I thought in these two options: Option 1 : restore them in some way since they were already shown in the client. In other words, they already are in the user's computer. is
I would like to use Jquery selectable on a mobile device
Hi I am currently busy on development of a mobile web application and would like to use Jquery Selectable in my application. I have tested the code on a mobile device the problem i am having is the drag and multiple select does not seem to work on mobile device please could you assist me in how i could get this to work on the mobile version or if there is a Jquery Mobile version of this Selectable feature http://jqueryui.com/selectable/#display-grid
Next Page