• Is it possible to rename and order the table columns?

    I am truly to have to come back here again today.   I have googled all day looking for solutions but came up empty.   The code below was generously provided by Godsbest.   $("#example").on("click", "a[target='tab']", function(){   var me = $(this);   var url = me.attr("href");   var tabName = me.data("tabName");   var tabIndex = parseInt(me.data("tabIndex"), 10);   $.get(url, function(data) { var table = $( '<table cellpadding="4" width="100%" cellspacing="0" />' ),     tr = $( '<tr/>' ),     td
  • jquery get value from drop down

    how to get values from one drop down list to another drop down when  check box is clicked eg: if state drop down is in Current Address and when Check box is clicked Address is Same as Above it should display State name Same as Current Address in Permanent Address
  • Why won't ".end()" work if used after ".first()" in a chain?

    Hi, I have a simple bit of script.  changeToCollapse.toggleClass('box box-default').toggleClass('slab-pane').addClass(active)                 .children('.slab-pane').toggleClass('box-collapse collapse slab-pane')                 .end().children('div').toggleClass('box-collapse collapse').attr('id', 'collapse-' + $this.attr('href').replace(/#/g, ''))                 .children().first().toggleClass('box-body')                 .end().end().children('header').toggleClass('box-heading')              
  • jquery .each() within a json array

    Hi!   From the server side, PHP sends such a json object: {"status":1,"recId":"PL-17534","collectionDate":"08-04-2014","collectorsName":"asdf","donorsName":"","sciName":"asdf","family":"asdf","comName":"asdf","variety":"","area":"asdf","photoFiles":["1.jpg","internet.jpg"]} So i want to change the html content of an element , by customizing the contents of json object in the photoFiles array.   I tried something like this but doesn't seem to work $('#photosTab').html(function(){     $.each(json.photoFiles,
  • audio works in IE9 but not IE11

    I have some jquery code that calls a function called playSound, which plays a sound file when a dialog box opens. The sound file plays in firefox but not in IE11. It even plays in IE9. Does IE11 require some specific programming? I'm using jquery-1.8.3.min.js function playSound(soundfile){    $('#dummy').html("<audio autoplay='autoplay'><source src='" + soundfile + "wav' type='audio/wav' /><source src='" + soundfile + "mp3' type='audio/mp3' />Audio tag not supported.</audio>");   } playSound("media/alert.");
  • Ajax success value to parent function

    Hi I am trying to get the  Ajax function return values. <script type = "text/javascript"> function GetString(key) { alert(key); var keyValue = ""; $.ajax({ type: "POST", url: "ajax.aspx/GetString", data: '{key: "' + key + '" }', contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { keyValue = response.d; alert(keyValue); }, failure: function (response) { alert(response.d); } }); return keyValue; } </script> <script type = "text/javascript"> function Getdata(key)
  • Make a cross domain Post with credentials and a callback

    I'm trying to Post some variables Cross Domain using jquery's ajax method. The user's credentials must be accessible on the receiving end, and there must be a callback (containing a redirect) that doesn't fire until the post is "done". With the traditional callbacks basically getting ignored, this synchronous approach looked promising as it essentially "waits" until the post is finished. But, while this works perfectly in Chrome, it fails in FF And, naturally nothing works in IE, including the passing
  • How to prevent double click change state on Menu?

    I have a navigation tab which on click adds a class,  say "active". The problem is when i re-click on "active" it goes back to "in-active" state. Can some one help me here. Link to JSfiddle: http://jsfiddle.net/EGR65/ The script goes like this :  <script>(function($){ $(document).ready(function() { $('#yolloSwag a').click(function(){ var x69_Ownage = $(this).find('.showDropDown_X69').toggleClass('active_X69Arrow'); $('.showDropDown_X69').not(x69_Ownage).removeClass('active_X69Arrow'); var active99
  • Horizontal slide between two ul : different positions

    Hi ! I'm trying to create a slide between two <ul> tags when I click on an image button. Click on the "image button" at the top right corner to see : http://jsfiddle.net/Xroad/CnSEa/3/ $('#content-clients').css('left', '150%'); $('#btn-clients').click(function () {     $("#main ul:first").animate({         left: '-150%'     }, 500, function () {         $(this).css('left', '150%');         $(this).appendTo('#main');     });     $('#main ul:first').next().animate({         left: '0'     }, 500); });
  • Can't get formatcurrency to work

    Sorry, I know I'm messing up something basic but I can't get this to work. I used this demo with the on blur sample: http://www.bendewey.com/code/formatcurrency/demo/ Can't get it to work. Here's my form with the field Projected Start-up Value: http://youradminpartners.com/sales-contact-entry/
  • Customize Cycle2 Controls

    Is anyone aware of a setting in Cycle2 which will allow the user to hover over the slideshow to make the prev/next control images display?   I want the control images to display in the lower right of the slide show when the user mouses over any part of the slideshow.  Currently, the user has to mouse over the cycle-prev and cycle-next divs; which span the slideshow top to bottom.  That method does not allow me to place the controls together since the user would have to "fish" for them to make them
  • Is it possible to define Offset value for scrollTop?

    I have the following script, <script>       $(document).ready(function(){       $('#yolloSwag a').click(function(){       $('html, body').animate({scrollTop: $('#Dailyoffers_X69').offset().top}, 999, "easeInOutQuad" );       return false;}); }); </script> This perfectly works fine and scrolls to the div#Dailyoffers_X69. But I was wondering if it is possible to define the offset value relative to the div#Dailyoffers_X69, say +-10px etc.
  • jstree - how to use method get_top_selected

    Hello jsquery users I am trying to use jstree plugin. The tree is viewed perfectly and the leafes are perfectly selectable. I want to push a button and then get displayed the selected nodes. I looked up many proposals and tutorial but could not yet solve the issue.   my html form looks like: <form id="suchphrase" name="suchphrase" method="post"> <button id="summary" class="btn">Summary</button> </form> <div id="jstree_demo_div"></div> my js is as: Can you help me with this?, Thanks for assistance,
  • jquery Cycle -- slideshow

    Using jquery Cycle plugin, how can I use the "prev" and "next" buttons to cycle through images ( more than 2) without using the pager method? Can someone help with with an example? Thanks in advance.
  • Themeroller download not working?

    I am trying to use Themeroller for the first time and can not get the download function to work. When I click the [Download Zip] button nothing happens. I'm using a Windows 7 PC running the latest version of Chrome and Firefox and get the same result in both browsers. There is no error and the browser doesn't appear to be doing anything. Here is the test theme I created: http://themeroller.jquerymobile.com/?ver=1.4.2&style_id=20140430-97 Any guidance or advice would be appreciated.
  • UX: JQM Header renders incorrectly for several seconds when page is loading.

    JQM V1.4.2 Browser: Chrome, Firefox. Platforms: Android V4.x. The browser window paints the jqm header very weird when the page is loading (see video). The content spans several lines in the browser. After a few seconds (10 seconds on a smartphone, which is rather long) the jqm header is displayed correctly once all CSS/JS is loaded and executed. Screencast:  https://dl.dropboxusercontent.com/u/5629939/temp/20140430-jquery-mobile-header-startup-gui.mp4  The video was made on a desktop, on a smartphone
  • Help with magnific popup plugin

    Hey. I need help wih this plugin. It's a part of Ultimate Shortcodes Plugn to wordpress. I would like lightbox to shwnot only picture and title but also a content of the post. How can i make it? Now it looks like this: <div class="mfp-figure">'+ '<div class="mfp-close"></div>'+ '<div class="mfp-img"></div>'+ '<div class="mfp-bottom-bar">'+ '<div class="mfp-title"></div>'+ '<div class="mfp-counter"></div>'+ '</div>'+ Here mfp-title gives me the title of the post, i would like to get content as well.
  • values comparations

    I have two values and I need to compare both, well I have this code but when I do something like this the code doesn't do anything in the if part. var speechtext = $("#speech").val();     speechtext = speechtext.replace(/ /g, '');     var cedula_2 = new String(speechtext);     var elements = document.getElementsByClassName("index");     for (var i = 0; i < elements.length; i++) {         var prueba = elements[i].innerHTML.replace('<span id="MainContent_dt_estudiantes_lblcedula_', '');         prueba
  • Loop through DIV storing REST Values

    Hi all, I have created a div to store values from a REST call as follows:  $("#projectSiteVariables").data({                     "projectTitle": value.Title,                     "projectTitleID": value.SiteTitleID,                     "projectActiveTitleID": value.ActiveSiteTitleID,                     "projectArchivedTitleID": value.ArchivedSiteTitleID,                     "projectTypeID": value.ProjectTypeID,                     "projectYear": value.Year,                     "projectSCURL": value.SiteCollectionURL
  • Help add more 'if' to code

    Hello My code checks the username entered in a PHP file. The jQuery then displays if the username is taken or not. I have added code to the PHP file to also check if the username is below 3 characters or over 16 characters. How do I add another if within this code to display the correct result? I know the code will be  if(d=='under'){     $("#usernamemessage").html("Username not long enough");    } But don't know how to implement it into the exsisting code. Thanks <input type="text" id="txtusername">
  • reading table values using jquery

    As it is evident from below question, I am new to jquery. I have a table that is defined as :  it has only 2 columns (but can have multiple rows) and I am trying to read the values using jquery.  I can read the first column(drop-down list) fine. But the second column ( <input type="text" ) does not work. Any idea why?  $('#studentTable > tbody > tr' ).each(function () { var $tds = $(this).find('td'); var $studName = $tds.eq(0).find('option:selected').val(); //works var $food = $tds.eq(1).val(); //doesn't
  • Toggle or Mouse Event Img size

    I have images inside a div with a class, that I want to resize on mouseenter, go back to size at mouseleave. For some reason I cant get it to work. Any thoughts of what I'm doing wrong? I also tried Toggle and that wouldn't work either. Thanks!     <script>         $(function() {             $(".single_entry img").animate({             width: 100}, 500);                      });         $(".single_entry img")         .mouseenter(function() {             $(this).animate({                 width: 300
  • change transform attribute of g in D3.js calendar view

    I am referring D3.js calendar view http://bl.ocks.org/mbostock/4063318. everything is working properly. but the issue is my data is something like: [{"Date":"04-26-2014 17:39:29","Available":"10","Open":"90","Low":"80","High":"90","RGraph2":[{"Date":"04-29-2014 17:39:29","Available":"10","Open":"90","Low":"80","High":"90","RGraph2":null},{"Date":"04-28-2014 17:39:29","Available":"10","Open":"90","Low":"80","High":"90","RGraph2":null}]},{"Date":"04-24-2014 17:39:29","Available":"10","Open":"90","Low":"80","High":"90","RGraph2":null}]
  • jquery.validation.js error display handling

    Hello, Source: http://jqueryvalidation.org/ I have questions, i noticed that when i use the same id tag the error messages shows up in random places. for example. <input type='text' class='required email valid' id='inputstyle' name='test1' /> <input type='text' class='required email valid' id='inputstyle' name='test2' /> <input type='text' class='required email valid' id='inputstyle' name='test3' /> The names are different but the id's are the same, if input test3 is wrong the error will show up
  • Event.keyCode always return 'undefined' in .on('input')

    Hello guys, I was wondering to create a ticket to report a bug, but I read that I need ask here first, so here I'm. I have a specific problem in the startup I'm working on that is solved by the following jQuery method: .on('input', function(){   });   The 'input' event trigger every action inside an input or textarea (copy, paste, focus, keyup [I think]). The thing is: I didn't want an alternative to this method, I already solved my problem using a 'quick fix', I just want know why the following
  • fading stopped working locally

    Hi all I am developing a site and for the life of me I cannot see why jquery fading or sliding will not work on my site (which I have used many times before in the past on other sites). Take this example:         $("#loginform").fadeTo('slow', 0, function() {             $('#loginform').remove();             $("#forgotpassword").fadeIn("slow");         }); Now, all that happens when I  click a link to trigger that code, the #loginform disapppears without fading out and the #forgotpassword appears
  • Autocomplete source

    Hi, I am struggling with the source option in autocomplete. The source data arrives as XML so I trying to reformat the data into an array of objects on success but the response callback does not work for me. In the code below, the first function for source does the correct server request and the array produced by jQuery.ajax.success is in the correct form AFAIK.     jQuery("input[name='cod']").autocomplete({         source: function(req, response) {                     jQuery.ajax({              
  • Page scrolling to top of page before transition?

    Using JQuery Mobile, is there anyway to stop the page scrolling to the top before a slide transition?   I am using JQuery 1.11.0 and JQM 1.4.2. PS, Is this just a perculiarity when viewing on the desktop and fine on the device?
  • shapeshift plugin: how to use

    I need to have a page which looks like this ( http://mcpants.github.io/jquery.shapeshift/ ). What will break down for a novice ( used python but not jquery) to have it run successfully. I am querying a list from database and want to throw it in a container ( like in link above ) and have user throw selective in the other container and do operations on selected ones.
  • Difference in $.data between jQ1 and jQ2

    jQ 1.11 camelizes keys added with $.data, while jQ2 does not camelize them: http://jsfiddle.net/trixta/6wAKJ/ Just wanted to ask wether this bug is already known? Can't believe it's unknown :-D.
  • Issue with Jquery Mobile Buttons on Chrome Mobile Browser.

    Hi There.  I'm brand new to jQuery and I have been going through a series of tutorials to learn the basics of jQuery Mobile.  As I was writing some of the sample code I noticed that on my mobile version of Google Chrome (Ver. 33.0.1750.170) Im not able to navigate to anchors on the same page. This behavior works fine in all versions (IE9, Chrome, and Firefox) for the desktop.  Below is a sample of the code that I was working with. (Please spare the critique about why i shouldn't reference links like
  • Subheading css class override behaviour changed in 1.4.2?

    I am trying to upgrade from Jquery Mobile 1.2.0 to 1.4.2 and have struck an annoying issue with CSS styling of headings. Sub headings <h3> etc that I have styled with a specific CSS style are no longer displaying with that style. e.g. the below code used to apply the subtitle CSS class and now reverts to Jquery Mobile standard. <h3 class="subtitle"><a href="civilrights.php" data-role="none">The Philosophies and Strategies of the Non-Violence and Black Power Movements</a></h3> CSS snippet .subtitle
  • Issues With Back Navigation

    I am developing a small app using jQuery Mobile. I have been facing an issue for past 3 days and i am not able to track what is wrong in my html or javascript. I have a multi-page html which is loaded first and when i go to some page(like B.html external link ) from (i.e A.html) it works fine and i have one more C.html which opens from B.html on some buttons click.      Problems start here when I press back button, when back is pressed C.html markup got appended into B.html and if I further press
  • Change the class of date randomly in Keith wood datepick

    Hi,  I am using keith wood datepick calendar. My requirement is  i have to set budget on some dates, as i entered the budget on text box i wanted to mention that budget bottom of that perticular date on the datepick open calendar. I worked it using    onDate: function (date, inMonth) { content: date.getDate() + '<br><sub>$56</sub>'},  but this will work only when datepick will load at the time of loading page. but now i want it to fly as i do the changes on text box it should mention on datepick
  • create array of objects

    Hi all, I have a simple question ,         If I have this variable:                            var template={                                          range : "54" ,                                          matrix1 : { 'a' , 'b' , 'c' },                                          matrix2 : { 1 , 2 , 3 , 4 }                                                  };           and I have three options of it,such as:                           template1={                                          range : "32"
  • Creating multi-dimensional array and retrieving values from array

    Hi,   I have multiple elements retrieved from JSON method, which I want to add to a array and then retrieve the values from it. I am not sure, how to achieve that. My current code is as below:   var srcs = [];  var enumerator = this.pictures.getEnumerator();     while (enumerator.moveNext()) {         var currentItem = enumerator.get_current();         var filename = currentItem.get_item('FileLeafRef');         var dir = currentItem.get_item('FileDirRef');         var caption1 = currentItem.get_item('ImgCaption1');
  • Forms in ui Dialog

    I have a standard form which uses .php to process. I have put this inside a modal window. It loads ok and displays fine following all the css rules. However, I can not select any of the fields / buttons or type in any of the fields. I would rather get this form to work than have to rewrite it all again. How do I get the already created and working form to work in this window or do I have to recreate the form using the dialog widget?
  • Enable Last two image buttons on the <li> of <ui> using Jquery

    Hi i am working on asp.net  4.5 + Jquery Here is my code:  If you could see my code i am using imagebutton on the repaeter. Is it possible to enable the last two image buttons and disable rest of all the image buttons using Jquery? any suggestion or sample please I did try with the below code and it didn't helping me to achieve: <script type='text/javascript'>     $(function () {         $('#mycarousel li#imgcontent').last().attr('enabled', 'enabled');     }); </script> The version of Jquery what
  • is :hover, different result using mouseleave and mousemove

    Hi, look at this example page http://www.gametalking.tk/provaIsHover.php (i'm using jquery/2.0.0) I need to show the red box hovering the black one, and hide the red leaving th black but ONLY if the mouse is not positioned on the red It's less convoluted than it might appear, imagine a drop down menu system. Anyway the problem is that the result of  var isHovered = !!$('#box2').filter(":hover").length; is different depending on whether it is positioned insiede the mouseleave event or inside the mousemove...
  • Problem display on Samsung S4

    Hello community. I am using jQueryMobile 1.4.2. When I view it in the browser and some devices, it appears great. But when I see my app on a Samsung S4, all items are very small. It has to do with: <meta name = "viewport" content = "user-scalable = no, initial-scale = 1, maximum-scale = 1, minimum-scale = 1, height = device-height, target-densitydpi = device-dpi "/> But do not know how to fix it. Someone already solved? Or to any idea for this issue I apologize for my English Thanks in advance. Regards
  • 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