• can't set a radio button with a variable that changes

    I have a Dialog box were a user can make choices. With each change in choice, I fire a function to initialize several variables. Most work, but I can't set the radio button via the initialize function.  What do I need to change? Edit - I also tried .prop('checked', true); with no result. Simplified, the code is: var countrySelected = "US";  // a global variable that changes function initialize() {       $('input[type=radio][name=country][id=countrySelected]').attr('checked', true); //did not work
  • Footer "data-id" issue (Fixed & Persistent footers)

    Footer "data-id" issue (Fixed & Persistent footers) Hi, i just ran into something strange!? Making the footer persistent between transitions works great, except that every time i switch back and forth between pages i get a "0" zero written to the page content. Here is the code... page 1 (zzz1.html) <!DOCTYPE html>  <html> <head> <meta charset="utf-8"> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" name="viewport" /> <title>Mobile index</title> <link href="jquery.mobile.theme-1.1.1.min.css"
  • preventing multiple events with .off().on() vs .one

    Since jQuery mobile keeps pages in the dom and I have found that my click events were getting attached multiple times. So I started putting .off before each .on so that I would make sure that each was only called once. However I wonder if using .one is better?  For example which is better? $(document).off('click', '#barcodescanner').on('click', '#barcodescanner', function() { or  $(document).one('click', '#barcodescanner', function() { I personally like .one because it looks cleaner. Any thoughts?
  • How to handle nested each with input type in Jquery

    I tried to look after a similar problem but couldn't find any here. So here is my problem. I have a structure with multiple div. Each div have a class name 'testClass'. I need to fetch the attributes of all input types, button. Here is my code,     <body> <div class="testClass"> /* Few Code */ <input type="text" id="txt1" /> <br/> <input type="text" id="txt21" /> /* Few Code */ <button id="btn1">Button1</button> </div> <div class="testClass"> /* Few Code */ <input type="text" id="txt2" /> <br/> <input
  • slider rel value

    Hi, a have problem to load 'data-rel' value from every slide of image. In this code rel value is loaded only from first image. <script type="text/javascript"> //<![CDATA[ ;          $(function(){             $('#slides').slides({                 preload: true,                 preloadImage: 'img/loading.gif',                 play:  $('.slide').data("rel"),                 delay: 500,                 hoverPause: true,                 animationStart: function(current){                     $('.caption').animate({
  • IE7 throwing "stop slow script running" error with all versions of JQM

    We stripped out all functions running on mobleInit and page init, removed all extensions, so we only had jQuery and JQM loaded. When transitioning from one page to another on form post, we see the "stop slow script running" JavaScript alert thrown by IE7 on desktop. On a device (Windows phone with IE7, iPhone 3G Safari, ) the page hangs and doesn't transition. The ui-loader is displayed, (but the animated GIF is stopped) I see that the results page is passed to the browser (via Fiddler) but not displayed.
  • Setting the theme of a checkbox on page load?

    Looking at the documentation it states that you can set the theme of a checkbox using; $("input[type='checkbox']").checkboxradio({ theme: "a" }); However when I try and run this code inside the document.ready function it doesn't set the theme? I can set a buttons theme using; $('a').buttonMarkup({ theme: "a" }); Does anyone have any idea what I'm doing wrong? Thanks. P.S. I've tried adding thsi as well which didn't help $("input[type='checkbox']").checkboxradio('refresh');
  • Disable all jQuery Mobile except for specific events

    I'm developing a WP Touch theme and need to add some specific touch events which are not available. I've used jQM in the past for this same event but the site was pure jQM so there were no conflicting scripts. In this instance, when I enable jQM all kinds of conflicts are created, like this error when I click the home link in my header: Uncaught SyntaxError: Unexpected end of input. So I'm wondering if there is away to enable jQM only for this specific touch event? Or is there is any best practices
  • Have you seen this? Trying to figure out how to replicate..

    I'm not an expert on jquery, so I'm hoping someone far more experienced and knowledgeable can help. Check out this site: http://www.impressapenguin.com/ Can someone explain how to replicate that scrolling/clicking effect?  Thanks in advance for any help! -Ben
  • how to retrieve attribute value

    Hello, I am new to jquery. I am using jquery in sharepoint. I have added reference to jquery-1.3.2.min.js I have a variable named col= 'Project Title' In jquery, I am using like $(this).attr(col). Here I am getting below error The name may not contain the ' 'character:Project--> <--Title Please how can I resolve the error. Thanks in advance
  • i want to get value of these component and want to save in database in every new button click.

    Hi friends, I am new with jquery. i have a work in which i have to generate new component like text etc in a button click. Than i have to save that value in the database.  i succeed to get new component in every click but neither i able to get there value nor know how to store in the database.  in this the component like textbox etc are dynamically generated in click. here below is my code. <!DOCTYPE html> <html> <head> <script class="jsbin" src="js/jquery.min.js"></script> <meta charset=utf-8 />
  • Selecting Specific Elements in a List

    Hello all, I'm trying to specify a class to an element in my list but failing to do so, can anyone please tell me what I'm doing wrong? Code: http://jsfiddle.net/9keAA/6/
  • Back button in header won't go away

    Strangely the code below produces an unwanted back button in the header. As far as I know the default behaviour of the latest JQM is a disabled back button. Even trying to force it off, it still appears in the left control group. I've placed the buttons inside control groups as I want multiple buttons inside the header. A couple of things I've tried, - Tried having the right button outside the control group - no difference. - Swapping out fieldset with controlgroup makes no difference. <div data-role="header"
  • how to find if an array based on a unique key already exists

    Hi, I have an json string , which is a below , precisely its an Array of Array's which is assigned to javascript variable as something like below for example. var tempArr =  [{"state":"PREL","Handled":"no","Slogan":"RAW","id":0},  {"state":"APPR","Handled":"yes","Slogan":"MTS","id":1},  {"state":"PREL","Handled":"no","Slogan":"RMF","id":2} ]"; The Main Problem is that as tempArr is Array of Array's,  How can i find if the Array with id=0 or 1 or 2 already exists in the Array (tempArr) that is holding
  • missing dynamic data content in display

    I have run into an odd occurance and can't seem to figure out what is happening or why.  This is occurring on iPhones; I have tested the site on an Android emulator and it appears fine, as does the site on desktop browsers like Chrome and Firefox. Development page is here: http://abmm.hdma.net Issue is this - for my lists of people, the last dynamic variable that is setup to be displayed happens to disappear from view.  You can see this happening in several places: Home page > Attendees > *individual
  • How to start Session in Jquery and then use it in php.?

    Hi firends, I want to create a session in jquery and then want to use that in php.   var sl = $('input:text[name^="Slno_"]', row).val(); using this  $.session("in_tra", in_tra); <--not working--> session.setAttribute("example","mysession");<--not working--> Pls Guide me how to do this? Thanks
  • #{...} not allowed in a template text body.

    Hi, I am very much new to jQuery. I am trying to add new tab. I have created a tab template: var $tabs-task1 = $('#tabs).tabs({ tabTemplate: '<li><a href="#{href}">#{label}</a></li>', add: function(event, ui) { var tab_content = 'Added dynamically.'; $(ui.panel).append('<p>'+tab_content+'</p>'); }}); then on a button click I am calling the following js function: function addTab() {       $tabs-task1.tabs('add', 'new Tab', 'New Tab');    } on running, I am getting the following error: #{...} not allowed
  • .net button event not firing in JQUERY Mobile but fires after refresh

    JQUERY Mobile Framework issue in .net server methods   .net button event not calling the server method first time but fires after refresh.   how to force it to fire when user click at the first time.   Is this a bug in the framework or an issue of the way it has created in the system?
  • IE .last() issue

    At some point of my code I need to extract the id attribute of an input element of the web form, wich is structured in a table format. So I decided to use the next code: id_input = $('tr').children($('input[type="hidden"]').last().attr('id')); It works fine in Chrome, FF and Safari, but brokes under IE 7+ The var 'id_input' returns in blank. ¿There's any solution without using CSS?
  • How to access a drop down list using jquery?

    Hi, I have added a search box and a drop down list for it and trying to link the drop down option in the search box.My code is: var quickSearchConfig = {         delay: 500,             // time to wait before executing the query (in ms)         minCharacters: 3,       // minimum nr of characters to enter before search         scope: "All Scopes",     // search scope to use         numberOfResults: 15,    // number of results to show         resultsAnimation: 200,  // animation time (in ms) of the
  • Adding data & layout to queue to load dynamically

    Hi. I am new to web development and jQuery and would greatly appreciate your help. I have a website that displays live information for clients, which is the code below, however I would like to add the layout and data/information to a queue (or anything similar) to load it dynamically (so that the data loads in order rather than randomly or all at once) because at the moment it loads it all in one go, and the data then gets displayed whichever finishes loading first. Code: function initPage() {  
  • load additional javasscripts via loadPage function when using AJAX

    When using AJAX to transition pages, no additional javascripts are loaded if the new page has new javascript in the header, etc.. I have done a dirty hack to the loadPage function which loads all the additional scripts from the html string returned via AJAX (see attached for hacked version). The code just needs adding to the success function of the ajax call in the loadPage function-                                         // START modification (Guy Thomas 2012083000)                                        
  • Porting from prototype to Jquery using the $H();

    Hi i am finally porting from prototype to jquery and i would like to know how to convert the code snippet below ? var PageImage = $H(); thanks in advance
  • How to link from a selection list to a complete new php site

    Hi everybody. I'm new to this here, so please be patient with me. I have a problem with a link to a new php file. Under the following URL you can see where my problem is: http://www.hansainvest.com/testing/iphone/ In the upper left corner is a button with the label "Fondsfinder". If you click on it a selection list pops up, kind of a dialog. If you choose the first entry that is named "HANSA D&P" the file "fondsdetails.php?fondsId=12" should be opened and some information about this fund should be
  • How To get value of selected DropDown list item?

    hi friends, I have created one application <select id='reimbursement_"+RowCount+"' name='reimbursement_"+RowCount+"'> <option selected='selected' value='None'>--None--</option> <option value='DA'>DA</option> <option value='Ticket'>Ticket</option> <option value='Misc'>Misc</option> </select> Here row count value is changing every time. I want to know how i can get the value of selected option value. Thanks
  • How to get the exact row value on every button click of that row?

    hi friends, I have made a dynamic table in which new index is created by default but while i am going to fetch the value of particular index of object value then it always taking the first index value of that objects.   Here is the code <script language="javascript" src="js/jquery.min.js"></script> <SCRIPT>     RowCount=1;     stat=false;     function AddRow()     {           jQtable=$('#SaleTable');         jQtable.each(function()         {             var LastRow="<TR><TD align=center><INPUT TYPE='text'
  • Jquery Conflict

    THIS IS THE CODE : When slider is working, The Jquery validator is not working. I tried noconflict but results are same..Please help me to resolve the problem. Thank you... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="js/jquery-latest.js" type="text/javascript"></script> <script src="js/jquery.validate.js" type="text/javascript"></script>   <script>   window.onload
  • Validate - Suggesting New Methods

    I  have used the Validate Plugin and it has made my design job much easier. However there are a number of validations that I would like to do that are not possible using only the plugin without other code. How can I pass on to the coders my suggestions for additional methods to possibly be added to a future release? Here is a list of some of the methods I would like to suggest along with how they can be used. If some of these uses are currently possible with the current 1.9 version (and I did not
  • conflict between Jquery libraries

    I have a main page which has a div which carry several other pages. while a page loads a $ dialog opens with the message carrying. the problem is that when a page already has a reference to jquery library, the dialog does not close. remove the reference to the page that was loaded into the div, the dialog closes, but the components they did refência the library, do not work.
  • Using AJAX to insert HTML images

    I have a web page that has images hard coded in HTML that I want to make dynamic so that I will not have to enter new HTML every time I have new images.  An example of the page is here.  A very simplified version can be seen here. In reading "jQuery in Action", it appears that Loading Content would be a way to insert in the simplified version above the lines       <a href="images/5566_120512_b.jpg" title="Filler images only"><img src="images/thumb/5566_120512_s.jpg" alt="Filler images only"/></a>
  • Searchable Listview

    Using this as an example:     <div class="foo" id="threeCOL" data-role="content" data-theme="d"> <ul data-role="listview" data-filter="true" data-filter-placeholder="Test..." data-inset="true"> <li data-filtertext="NASDAQ: NAS ADBE Adobe Systems Incorporated"><a href="#">Adobe</a></li> <li data-filtertext="NASDAQ: NAS AMZNL Amazon.com, Inc."><a href="#">Amazon</a></li> <li data-filtertext="NASDAQ: NAS AAPL Apple Inc."><a href="#">Apple</a></li> <li data-filtertext="NASDAQ: NAS GOOG Google Inc."><a
  • Following Form Post, response is returned, but not displayed in IE7

    Our staging site is pretty stable in browsers Firefox and IE9, but we're seeing issues with IPhone 3G Safari V4.2.1 HTC Windows IE V7.0 I am able to reproduce issue in native IE7 as well. On posting the form, I see result has come back to the browser (with Fiddler), yet it does not display. The ui-loader div continues to display, then we eventually get the popup, "A script on this page is causing Internet Explorer to run slowly." My changes include: jquery.mobile-1.0rc1.min.js updated to jquery.mobile-1.1.0.min.js
  • Syncronize the order of variables returned by $.ajax.fail(), $.ajax.done(), and $.ajax.always()

    1) Syncronize the order of variables returned by $.ajax.fail(), $.ajax.done(), and $.ajax.always(). - the reason for this is mostly to do with using the .always() callback. It's hard to tell when to treat it as a success vs a failure.  There should always be a variable that contains the response from the server because even in a failure the response is useful for debugging.  2) The jqXHR object should contain a Boolean property that shows weather the response would invoke fail() vs done().  This
  • Radio buttons validation with multi forum

    hello, after trying unsuccessfully for 4 days my script, I need you: I have 3 forms on the same page. For each, I have 3 radio button, and the form is automatically submitted as soon as I click a radio button. The value of the radio button is then retrieved from a php page, and rendering is displayed in a div The following code works fine for one form, but instead of 3 different functions (indicated by the "testsubmit(xx)" in the code), I have wanted to make only one, but I do not know how. >> Please
  • Jquery Sortable Grid Customise ?

    Hi,  Looking at this example : http://jqueryui.com/demos/sortable/display-grid.html I'd like to keep this sort of feel but change the 'tile' colour and add an icon to each tile. The icon will be different depending on the value retrieved from my DB. Could some one point me in the right direction :) Thanks
  • how to prevent vertical scroll bar from flashing on/off

    This must be a FAQ so I hope someone can point out a link to a solution. When changing to a new page in my jQuery Mobile app, the vertical scroll bar flashes on and then off even when there is not enough content between the header and footer to need a scroll bar.  So how to prevent that from happening? 
  • Please Help with .hover() to hide,reveal multiple items on page at same time.

    Completely stumped as to how to get this to work. I need to have 4 things all happen when a img in my slideshow( originally gotten from a earlier post by Rminde. thanks for sharing !)  is hovered over. my problem is that when I try and add to the .hover event, it breaks the code. Any help is greatly appreciated My jquery.  $(function(){ var over = false; var fadeInterval; var delay = 3000; function fadeMovies() {    if(over){return false;}    var current_img = $('#movies a').eq(0);    var next_img
  • POST query with jQuery.ajax and 'jsonp' datatype

    Hi!     I'm trying to make a script that passes a lot of information to a different site that the webserver that hosts the script. For doing that I need to use jQuery.ajax function with a datatype of 'jsonp', because the cross-site scripting problem, but I just can make work it with the GET queries. The problem with GET queries is that I need to pass a lot of information and there is a URL limit that is impossed by the webserver.     It is possible to make a workable  jQuery.ajax function with 'jsonp'
  • Need help on my code to fade in and out 3 images before redirect

    I basically want to have 3 images fade in and out. Once the third image fades out the website then redirects. The code below does exactly what I want for 1 image, but I need it to do it for 3 images and not sure where to go from here. <img src="images/slide1.jpg" alt="Example" id="slideshow" /> <script> $(function() { $('#slideshow').fadeIn(3000, function() { $(this).delay(1000).fadeOut(2000, function() { window.location = 'http://google.com/'; }); }); }); </script>
  • Animation conflict background color?

    I'm using the animate color plugin.  On the page I'm making, multiple things are animated, all triggered by the hover action. Alright, so I got it set up so when I hover over a certain div, I'm using animate to change the background color. When I stop hovering, the color animates back.  The problem is, if the background color animation hasn't completed and they hover over something else that animates, the background color stops animating. It just stops. If that makes any sense. No other animations
  • 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