• How do I update the html inside a variable

    Hello, I have the following html inside a variable: <tbody><tr class="contract"><td style="width: 25%"></td><td style="width: 25%"></td><td style="width: 25%"></td><td style="width: 25%"></td></tr><tr><td colspan="1"><input type="hidden" id="radio42918" visiblecondition="" mandatorycondition="" class="radio-values"><span class="prompt42918"><label class="prompt-label prompt42918" colspan="1" itemid="42918">Radio<label class="mandatory-text-sign hide-item">*</label></label></span></td><td colspan="1"><input
  • How to tell that a submenu has been selected rather than the top menu

    I need to determine that the user has selected a sub-menu item rather than the top level item, and I'm having real trouble in determining that within the select event. I tried if ( ui.item.children('ul').length === 0) But the problem I have is that if the user clicks on the top level menu and then clicks on it again, it triggers the event, and subsequently using: ui.item.context.textContent contains all the sub-menu items.
  • history.back(); to empty page

    Hello guys! I'm using jQuery mobile for a while now and i bumped into a problem that i have never seen before. I'm using phonegap to make my project an native app on some devices when i call history.back(); it will go back to the page and then jump to an empty page (or let's that page hide). I'm using jquery mobile 1.3.2 and i know it's solved in 1.4.5 but i can't just upgrade to this version because i did alot of curstom changing in the 1.3.2. So i hope that one of you guys knows how i can fix this.
  • understanding usage of deffered.promise in jquery animation

    hey guys have a look at this code below ,  FIDDLE HERE Code here :: $("button").on("click", function () {     $("p").append("Started...");     $("div").each(function (i) {         $(this).fadeIn().fadeOut(1000 * (i + 1));     });     $("div").promise().done(function () {         $("p").append(" Finished! ");     }); }); now what is promise() even doing in this code ? .  aso another question i woudl like to ask is , is  Deferred, Promise and Future a Javascript thing ? or is it all only exclusively
  • scripts.js function doesn't run when button is clicked

    Hello, I have a button used for logging in, and when a user clicks this a box should be overlayed allowing them to login, I know it does work as the site I'm using is a template, however in practice it doesn't work. HTML: <div class="header-login">           <a href="#" class=""><i class="fa fa-power-off"></i> Login</a>           <div>             <form action="#">               <input type="text" class="form-control" placeholder="Username">               <input type="password" class="form-control"
  • Why does changing the val of a text input element in jQuery not fire my TextChanged event?

    I'm trying to change a value in jQuery that will cause a chain reaction, so to speak, to fire the element's TextChanged event. I've got this server-side code: PDFGenBtnClicked = new TextBox(); PDFGenBtnClicked.ID = "pdfgenbtnclicked"; PDFGenBtnClicked.Text = "no"; PDFGenBtnClicked.Style["display"] = "none"; PDFGenBtnClicked.AutoPostBack = true; PDFGenBtnClicked.TextChanged += new EventHandler(PDFGenBtnClicked_TextChanged); . . . protected void PDFGenBtnClicked_TextChanged(object sender, EventArgs
  • AJAX POST

    I want to post my entire form, do I need to specify each field or should this work? $( document ).on("click", "#register-submit" , function() {   $.post( "register-process.php", {}).done(function() { alert( "Registration Complete");   }); })
  • Lookng for a good responsive menu , something like the one on https://hbr.org/

    hey guys .  have a look at the menu here  , i reallly like that menu , the menu used on that site is very similar to a popular jquery plugin , Sidr.js  . but the menu used on that site is different in a few ways and is more elegant than sidr.js .  is there a jquery plugin thats similar to that one as on the site link i provided ? I really love that menu .  basically i just want to experiment with different kinds of responsive menus. (preferably not experimental ones ! ) .Any suggestions ? 
  • newbie 3 part form processing question with include

    Hi all, I am a query newbie attempting to incorporate J query mobile into a pre-existing multipage website. In this case I have this previously working Page setup:  It may sound a bit odd but it is working fine negotiating with and external website mypage.php in this header I have various https://code.jquery.com/xxxx links (only here) In the body of this page I have A PHP include to = myform.php myform.php is and rather complex form that goes in three parts to the external website - (this form came
  • meta http-equiv="refresh" not working with JQM

    hi all, Currently I am using JQM on a multi page site submit button on page 1 that goes to page 2 has : rel="external" and works well however on page 2 I have database processing at the top - then  this header that goes to page 3 <meta http-equiv="refresh" content="0; url=page3.php"> Without JQM page 1 goes to page 2 then auto goes to page 3 WITH JQM - it STOPS on page 2 and doesn't see the refresh I guess.... Q: Is there a way to get this to process to get to page 3?
  • Drop position on a Jquery Draggable and Droppable

    Hello. I want to make a floor plan with a sidebar draggable elements into a container droppable. Then, from that container where i drop elements from sidebar, i want to make them draggable again to arrange where i want in the container. http://jsfiddle.net/96t0qwmg/2/ I`ve made an example here but it has some problems: 1) when i drag elements from sidebar, they not placed where i dropped in container. Need to position them exactly where i drag. 2) if i drag 2-3 links from sidebar to dropable, then
  • controling authentication using jquery mobile

    Hi. I'm new on hybrid apps. I try to develop a hybrid app using jquery mobile. I try to make a login form and post it. I think that post username and password using ajax. How i can keep logged-in user data on my application. And how i can control a page is shown or not  to user by his authenticate state. I hope, i can explain my issue. Can anyone give me an idea? Thanks in advance.
  • can I use the jquery ui component in jquery mobile?

    Hi, I am a beginner of jquery mobile programming! I want to know the relationship between the jquery ui and the jquery mobile. If I use the jquery ui widgets in a jquery mobile project for handset, did them will conflict? Thanks a lot!!!
  • How to Use a Variable As Array Name

    How can I make the alert work? ========= code ============= var arr0 = ["king", "queen"] var arr1 = ["boy", "girl"] var arr_name = [" arr0", "arr1"]; alert( arr_name[0 ]. length);
  • ie11 Unable to get property 'nodeType' of undefined or null reference

    I have a curious problem that I have been struggling with for a few days. I have a simple psp page written with jsp 2.2, richFaces 4.5.7 (which loads jQuery library v1.11.3) running on a WildFly-9.0.0 server.  When I load the page in Internet Explorer 11 (it all works in Firefox and Chrome) I start to get errors, the first is in jquery.js line 4198: // Minified: var a,b,c     var input = document.createElement( "input" ),         div = document.createElement( "div" ),         fragment = document.createDocumentFragment();
  • How to add content in a div using jquery

    Hello I am experimenting an issue using jquery to create come content to be displayed inside a div. I am using the plugin Lightbox for photogallery. Lightbox display a large image , once clicked on a thumb, that is not part of the original html dom where the thumb is placed, so is getting a bit tricky for me that i am learning jquery. I have a $title variable to be shown inside a div that contains an image. the title is related to any image I have in the gfallery. this is my php page that i created
  • splice and push - Easy But..

      alert(process_stage1[1])  returns undefined. Why???    stage0 =["a", "b", "c", "d"]; -----------------[code] -------------------------------------------    var stage_status = 'initial_stage';      if(stage_status=='initial_stage'){     var init = stage0.splice(0, 3);                                                          process_stage1.push(init);      alert(process_stage1[1]); // undefined??? Why???      } //if
  • How to apply css style on determine row in html table.

    Hi, I would like to realize an analysis of data in a table html . That is, I want to know if it is possible in jquery check if all < td > are filled by values , if a  < td > contains a value <5 , if another <td>has value " successful " . When one of the cases described above occurs , I would turn red background color in the column row . Thanks in advance. Tegatti
  • AJAX on a page loaded by AJAX

    I have a page index.php for example, on this page I have a menu and depending on what menu option is selected the page content is loaded. One (actually many of these pages) will be forms which I then want to also post via AJAX. However when my page loads via AJAX (add_user.php) I can't post this using AJAX Why?
  • How was code contributed before GitHub Pull-request was used?

    Does anyone know how the code was contributed to the project before GitHub Pull-request was used? via patch on mailing list or issue tracker? Is that history archived? Thank you! Shin
  • Newbie: best method to send data and return results without leaving site?

    I haven't written the code yet (actually looking for examples/samples for this as well), but I have hypothetical scenario where a user is on a checkout page and I want the user to enter in their shipping/handling info (or it's entered automatically) and they click a "send this info" button. They never leave the page, and it just returns saying successful. But after they click the send button it actually goes and posts the info to a different website/db and saves this info. I'm thinking a RESTFUL
  • resizable accordion is broken in latest release

    so I was working on a jquery accordion that I wanted to customize with some special behavior. The widget I am working on only has 1 tab and is collabsible, resizeable and draggable. I have applied the resizeable to a parent widget. since I don't want the parent widget to obscure more space than it needs if the accordion is collabsed I resize the parent widget when I collabse expand the accordion. I use 4 variables to this. (uncollapsed width/height and collapsed width/height). I get the active state
  • jquery selectable

    Hi, I downloaded JQuery selectable from the webpage, as I have 3 different services(plans, i.e trial, basic and premium) that I want my customers to be able to choose from. All three are situated next to each other, separated in different div-s and consist of information, for example price, storage, bandwidth, etc.  The problem I'm having is that I need to save the selection, in order to be able to send it to my database, but I'm unable to save it like selection 1, selection 2, selection 3 because
  • floating menu, lags during page scroll

    Hi guys,  I have a floating menu moves together with the page scrolll. Here is my code. $(window).scroll(function() {    var bottomHeight = $(window).height()/100*35;    $('.logo').css('bottom',parseInt(bottomHeight) - parseInt($(document).scrollTop())); }); Problem is when i scroll move then one frame a time, the menu will look like its lagging. Does anyone know how to fix this?  Thanks in advance.  Cheers, Thomas
  • JQuery-UI draggable reset to original pos

    Hi, How to reset the draggable elements. And also attached zip files. Without reset it is working fine. Below is code :- <!DOCTYPE html> <html lang="en"> <head>     <title></title> </head> <body> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>     <!-- <link href="http://code.jquery.com/ui/1.8.24/themes/blitzer/jquery-ui.css" rel="stylesheet" type="text/css" /> -->
  • jQuery.each breaks on undefined object

    Hi, I'd like to ask some enlightenment on what's the reason behind $.each function breaks the loop when there is an undefined object.  This is a sample link
  • Transition from JavaScript alerts to jAlert?

    Hi! I'm working on a quiz-like game for a website. You enter letters into separate fields to spell a word. If the word is right, you get a "congratulations" dialogue; if it's not, the dialogue tells you how many letters you have right out of how many total letters there are. However, the standard JavaScript alert isn't ideal in this situation for two reasons: I need to insert a link to the next question if your answer is correct. A lot of browsers enable you to turn off dialogues after a certain
  • Cancel sortable

    Hi! I have a problem with sortables cancel method. When the user moves one item in the sortable to a new place I save the position via ajax (called in "update"). If the user moves another item after his session is expired, I want to cancel his / her last move and move the item to its old place. But $( 'selector' ).sortable( 'cancel' ) reverts both moves. How can I cancel just the last move?
  • dragging over an image to change image

    I need to create the effect similar to this page: http://www.teslamotors.com/modelx where you can drag on an image to change it. what's the best way to create such an effect? Thanks for any suggecstions
  • Getting values from array of same class elements in jquery

    <tr> <td class="moduleSupport"> 1 </td> <td class="moduleName"> Cargo Hold </td> <td class="currentModuleQuantity"> <input class="currentModuleQuantity" placeholder="Enter current quantity" type="text"> <span class="currentModuleQuantityErr"></span> </td> </tr> <tr> <td class="moduleSupport"> 1 </td> <td class="moduleName"> Crow Nest </td> <td class="currentModuleQuantity"> <input class="currentModuleQuantity" placeholder="Enter current quantity" type="text"> <span class="currentModuleQuantityErr"></span>
  • French Characters Corrupted on Form Submit

    Hi All, Long time lurker, first time poster. Would it be possible for someone to please help me out. I have a guestbook in jquery mobile that also needs to be in french. upon form submit of any of these french characters: "áàäãâùæçéèêëîïôœùûü«»ÜÛÙŒÔÏÎËÊÈÉÇÆÄÂÀ" it automatically replaces the entry with these characters: âùæçéèêëîïôÅ�ùûü«»Ã�à Pages are encoded in UTF-8. For test purposes, try pasting: "áàäãâùæç" in the last text field and hit submit. Any help is greatly appreciated.
  • How to detect HTML5 stream was disconnected on Android by jPlayer

    I use jPlayer  as my HTML5 stream player, I prepared two channels, if channel one is disconnected I can switch to channel two, and I want do it when playing, I can't find disconnect event on HTML5 audio api, so I use ended event as disconnected status, it works perfect on desktop and iPhone, but not work on Android, when I play on Android browser, and disconnect on purpose, the browser looks like play but the sound is lost, that's mean if I lost signal on Android browser will not trigger anything,
  • 'Select' fields in form - problem with adding correct class

    Hi everybody! I have simply form in jQuery and I wanted to add more 'select fields'. And I have little problem - I can't figure out how to use Class JUST ONLY AT ONE field - which is active (clicked). Now I have something like this: after click on each field, all fields are being active. But it should be active (new Class) just for this element (field) which is clicked. I tried to add "$this" in some part of code, but it still doesn't work... Any help? Here is DEMO
  • Any jquery library that takes care of viewports?

    Hi, I created a website for a client that insisted on an image that is now causing problems on tablets.  You can see the image at: www.zionism101.org.  Its a temple, with one column on the left, one column on the right, and content in the center. So I put in a meta-viewport tag, and it is better, but people have to swipe their fingers together on some of the tablets to get everything to fit.   Is there some jquery command or library that can figure out the zoom that is necessary given the tablet?
  • IE9 Ajax get issue with cookie and session

    Hi all, I am having weird issue with IE 9 when making ajax get request using jQuery. I am using jQuery 1.11.4 Here is my get Request looks like.  $.ajax({                 url: 'AddressTypesListChange',                 type: "Get",                 xhrFields: {                     withCredentials: true                 },                 data: { 'addressType': $("#AddressTypeslist").val(), 'addressId': modelObj, 'type': $('#AddOrEdit').val(), 'companyName': $('#hdncompanyName').val() },            
  • changing the canvas element color on mouse over

    hi team, I have a canvas element and i created one circle inside the canvas container, now on mouse over and mouseout  i want to change the color of it. Instead of writing two functions for mouseout and mouseover is there any way like binding events(mouseover and mouseout). I have id of canvas container but not the circle id nor class of it. <!DOCTYPE HTML> <html> <head>  <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> function changeclr(){ var cnvs
  • MVC Jquery toggle elements when button is clicked

    I want to show the album name and category element when the corresponding button is pressed for that song. How do I do this? This is the jquery I have at the moment. Thanks for any help. $('.song-list-btn').each(function(i, obj) { $(this).on('click', function () { }); }); foreach (var item in Model) { <button class="song-list-btn" type="button"> <span class="fa fa-bars" aria-label="Song Details Menu"></span> </button> @Html.EditorFor(model => item.AlbumName, new { htmlAttributes = new { @class =
  • Adding a checkmark to the selected radio button

    Hi All... My front end app has a set of four radio buttons. I see that the shade of grey between the selected one and the unselected ones is fairly close and the change is subtle. I'm wondering if I can place a check mark icon on the selected one? Thanks...
  • More about putting a TE in a JQuery tabs widget tab

    I have been pulling my hair out over this one. I can setup a JQuery Tabs widget and I can put a JQuery TE into each tab.  I can also put a plain old boring TEXTAREA into each tab. Problem is, when I click a tab, I want it to give focus to the text editor instance in the tab. I have tried a variety of ways ot make this work with no luck.  The code I have been playing with is pasted below. You can see in the javascript function that I have tried several different ways to approach it, all with no luck.
  • Problem with detecting click event on an internal layer

    Hi, please, take a look to the next code: http://jsfiddle.net/mp3man/sn0gdsfa/1/ The problem with this code, is that when you click over the "green_layer", the "red_layer" click is catched too, and this is what to avoid. There's any way to do it, without changing the html context? Many thanks, Dani
  • Next Page

  • Announcements

  • The Basics of jQuery AJAX

    A step-by-step tutorial for those new to jQuery and wanting to use AJAX in their projects. Includes valuable information about troubleshooting using the console and understanding the request / response. http://jayblanchard.net/basics_of_jquery_ajax.html
  • jQuery Conference 2010: Boston Announcement

      The jQuery Project is very excited to announce the jQuery Conference 2010: Boston on October 16-17, 2010.  The conference will be held at the Hilton Boston Logan in Boston, Massachusetts.  The best part of this announcement is that Tickets are on sale now!  This venue is the largest that the project has worked with to date (Harvard Law School in ‘07, the MIT Stata Center in ‘08 and Microsoft New England Research Center in ‘09) and we expect to sell out very quickly. A brief synopsis of some of