• using the grep() function

    Hey guys im tring to use the grep() function to filter my array but im having problem as the array is returning empty. what im trying to achive is if the selected category exists in the array then for it to return the relevant rows. i've tried different variations in the return but im having no luck.  Any advise would be greatful...thanks guys selected['categories'] = ["Clothes" , "Footwear" ] filtered_data = jQuery.grep(data, function(index, item) {             return ($.inArray(item.category, selected['categories'])
  • Querying SQLite existing database using jQuery

    Hi there, I've a existing already populated that I want to query and display result. Here is my code and it is not working: http://plnkr.co/edit/XiAAPdiOj9A1YpYuDTwe?p=preview I'm getting uncaught ReferenceError: refreshtest is not defined index.html:209. that is for line gettest( refreshtest ); I saw examples and in most of the examples, after opening the database, table is created and data is inserted by using a form. Then queried. But I have already populated database, so I don't need to create
  • Jquery create table dynamically

    Has mydata table like this  and the output which I want to achieve is below in the image. Can you please help me to create the structure which is in the Image  Dynamically  Also Next time when I try to add a new item it should come under the same category. Can you please help me to generate th is using jquery or by using DIV & LI tags and assign the same dynamically. 
  • Passed object in post ajax

    Hello. I'm trying to pass data. var favorite = {}; favorite[videobody.id] = item.statistics; So, at the moment i receive similar object: Object{} 1 Object { viewCount= "88" , more... } When I passed data to ajax and result is empty or non-existing object. $.ajax({ url: "/admin/songs/ajaxViewers", type: "post", data: {favorite:favorite}, success: function () { // location.reload(); }, error: function () { alert("PROBLEM"); } }); How to rewrite to work?
  • jQuery functions not working properly on mobile

    Hi, I am working on the following site http://findmyhaus.com/ where we used jQuery for our menu. The menu is working fine on the desktop. However when we view the site on mobile we found that the menubar is not working properly. The "How it Works" link is not working at all where as the link "Why Use FMH.com" scroll down to the bottom of the the testimonials  instead of top of the testimonials. Following are the code used on header. <script src="//code.jquery.com/jquery-1.11.2.min.js"></script>            
  • help to parse data into cells

    I'm trying to parse value for each row. It's only working when i put alert inside for loop. this is my code  $(document).ready(function() {           var rows = document.getElementById('customerTable').getElementsByTagName('tbody')[0].getElementsByTagName('tr');           for (i = 1; i <= rows.length; i++) {         value=rows[i].id;         //alert(value);                  $.ajax                     ({                         type: "POST",                         url: "getdata.php",            
  • short-circuiting variable declaration .

    hey guys, was just going through modal.js and came across the following variable declaration ,  var doAnimate = $.support.transition && animate so does the above mean that , if $.support.transition elavuates to true and then animate evaluates to true doAnimate will be true and in all other cases doAnimate will be false ? 
  • Understanding custom events on modal.js

    Hey guys ! good morning .  Was just going through modal.js, and saw the following code :  var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) i understand its custom events or rather custom namespacing,   but whats with the 2nd parameter ?  relatedTarget: _relatedTarget  ,  That part is a bit tough to understand . can somebody tell me vaguely whats happening ? I am not expecting a 100% spot on answer . You can find the same line of code here  , line 53.  Thank you. gautam. 
  • How to Print Table Content in Document Using jQuery?

    Can you take a look at  this Demo  and let me know how I can use jQuery to Print only the table of the document? <!--panel-->           <div class="panel panel-primary">               <!-- Default panel contents -->               <div class="panel-heading">New Order               <button class="btn btn-sm pull-right btn-default" type="submit">Print Item</button>               </div>                              <div class="panel-body">                   <!--table-->                   <table class="table
  • Adding style for a particular class through jQuery

    HI,   I am trying to hide "a href" based on the title.   The controls are created dynamic.   <a title="Home" class="static menu-item ms-core-listMenu-item ms-displayInline ms-navedit-linkNode" href=""> <span class=additional-background ms-navedit-flyoutArrow> I mean, for title="Home" in the below span , i want to add style=display:none".       How to achieve this using Jquery? Thanks
  • QUnit - Standard reporter interface - Gsoc 2015

    I am computer engineering undergraduate in University of Peradeniya , Sri Lanka. and I am interested in this project idea. and I looked at the github and there was no conversation about it after sep 2014. In github they talked about mocha and Jasmine . So I need some guide through this. any help would be great
  • accordian for showing text

    hi jquery seemers. i create accordian but by default it is showing the available contents on  page load.and also sliding is not working correctly. idont want to show gaps in sliding and if i click on one link that is show all available contents in that menu  http://jsfiddle.net/harithareddy/q2L3rbmo/
  • web page is disabled or not

    Hi,  How do we test the web page is disabled or not.i my application there is a  dependency from section to section.once if uncheck the question the entire page should go disable.how to test this page gone to disabled mode using jquery. Ex:document.getElementById('AppForm').getElementsByTagName('TABLE')[6].getElementsByTagName('TBODY')[0].getElementsByTagName('TR')[0].getElementsByTagName('TD')[11].getElementsByTagName('TABLE')[1]; cheers..
  • jquery ui button with glyphicon - is it possible?

    Hi, Is there anyway of applying a bootstrap glyphicon to a jquery ui button? My current code for adding a button to our viewer toolbar is: function AddEmailButton() {     var emailButton = $('<input type="button" title="Email Documents" id="emailButton"></input>');     emailButton.addClass('atala-ui-button');     // click action for what to do with the button     emailButton.click(CleanupImage);     return emailButton; } I've tried adding this into the function: emailButton.html('<span class="glyphicon glyphicon-envelope"></span>');
  • I'm building in a password protected folder, jquery ajax loader takes over anchor & won't load

    Hi I'm an experienced web developer but I've not used jQuery before. I'm developing in a password-protected directory on a shared host. I've set up a mobile-style menu. The links that are outside the protected directory work fine, the ones to pages inside, don't. As far as I can tell, that might be because jQuery is using Ajax to load the page .. why, it's just a link? I've tried a few things to switch it off and nothing's worked so far. On click, I end up looking at a grey disc, coded thus: <div
  • jQuery Superfish align sub-menu under main menu

    Hi,  I used Superfish to display menu and submenus in horizontal style. As you know in Superfish all the submenus are left align. I want to align the sub-menus centered according to the main menu. I thought to find out the width of a sub-menus item. As in super-fish there is delay in appearance of sub-menus so I can't get the width of submenu item becuause I am using 'onShow'. Then in superfish onBeforeShow I cloned the item in DIV and tried to find out its width. But the problem is the width of
  • Trying to slide tabs horizontally when "next tab" button is clicked.

    Hi, I have the following code structure: <img id="#nextTab" src="..." /> <div style="width:700px;overflow:hidden">   <div id="tabs" style="width:2000px">     <ul>       <li>Tab 1</li>       <li>Tab 2</li>       <li>...</li>       <li>Tab N</li>     </ul>   </div> </div As the total width of the tabs is larger than the screen, the newly selected tab should slide to the left when the "nextTab" element is clicked. The following code succeeds in moving the set of tabs 300px left, but when trying to set
  • jQuery Grid: how to render a column in a separate ajax call?

    I have a jQuery grid that has 3 columns. The grid is populated by a webservice call. The third column has to fetch data from the server based on the result of the first call. How to achieve this? Currently, I am doing second ajax call in the renderer function, but unable to set the result of that call to the grid.
  • JQuery Cycle Plugin not working correctly

    Hi I am using JQuery Cycle Plugin on my site www.rhinoplant.com when i first go to the pages using the cycle the pictures appear and cycle but very small. and in the top corner of the Div. Any help will be greatly appreciated
  • How to solve Uncaught TypeError: undefined is not a function

    Hi, Can someone help me understand how to solve the error mentioned in the title? I have a dynamically generated select element with a couple of option values inside. Next the select element, is a button. When I click the button, I want jQuery to tell me whether or not I have selected only one option value or multiple values (array or not). This is the jQuery code: <script type="text/javascript">         $(document).ready(function() {             /*Detecting events on dynamically generated elements
  • Jquery Bootgrid Issue - Last Column Repeat

    HI, No matter what I do the last column value in the table gets repeated in that row. Please let me know if you have any suggestions Or redirect me to any other forum for an answer. Details on the code is also posted here http://stackoverflow.com/questions/28806855/jquery-bootgrid-rendering-with-value-in-last-column-repeated Thanks, Rakesh
  • Localization of Datepicker - How?

    Hi, I was reading http://api.jqueryui.com/datepicker/ and I downloaded .datepicker-fr.js from here: https://github.com/jquery/jquery-ui/tree/master/ui/i18n Here is my code: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Example</title> <link href="styles/css.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="scripts/jquery-2.1.1.js"></script> <link href="scripts/ui/jquery-ui.css" rel="stylesheet" type="text/css"> <script type="text/javascript"
  • accordian slide up

    hi to all , i tried the accordian it working correctly  when ever i click on my tab it is showing all available list items.  if i click on another tab it shows  available list items on that tab and also previous tab list items.  i want to hide the previous tab list....... hear is my code  http://jsfiddle.net/soreddysirish/krcvmhqq/   i want like this  http://viralpatel.net/blogs/create-accordion-menu-jquery/
  • Variable won't increment (++, += 1, etc) always equals 0;

    So no matter what I do the $_GET variable at the end"parts_added" is always zero. In the second while loop Iattempt to increment "parts_added" when the database returns1, which means the data was inserted successfully. $(document).ready(function(){ $("#save_btn").click(function(){ function makeHandler() { return function(data) { //alert(data); }; } $.post( "actions/add_waybill.php", { "waybill":$("#waybill").val(), "carrier":$("#carrier").val(), "datepicker":$("#datepicker").val() }, makeHandler()
  • share jquery lib in frameset.

    hi all, I must import  jquery   lib every  frame pages in frameset ? but i want import it only in my 'codetest page', can i  share the lib ? how to implemention  ? this is my 'codetest page' code .anybody can help me ? <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script src="/commsale/static/js/jquery.js"></script>
  • Filling an array with objects, objects lose structure

    I'm filling an array like this: function myObject(newname, newid) {  var name = newname;  var id = id;  function SomeFunction() {}  return {   ID: function () { return id; },   Name: function () { return name; },   DoWork: SomeFunction,  } } var myArray = new Array(new myObject("value1","1"), new myObject("value2","2")); But when I go back to get them (myArray[0]) the object I get doesn't have the structure and values I put in. Is there a better way to do this? I'm using jquery 2.1.3 in a Windows
  • Help with Date and Time Validation

    I got an old Javascript validation that I need to convert to jquery.  This current validation blocks 6/3/2015 1:15:20 AM. Basically, it looks for 2 Digits on dates and time, otherwise it fails. I need a jquery function that will replace IsDate function (below) and can validate 2 digit or single digits date and time , with or without AM/PM. Need help if I can fit in the jquery validation inside IsDate function, using the same structure.  In otherwords it should pass 6/3/2015 1:15:20 AM 6/3/2015 1:15:20 
  • Newbie: Removing tap highlight

    Hi,   Has anybody able to remove the tap highlight that appears with jQuery mobile? Tried couple of suggestions (via CSS only: -webkit-tap-highlight-color:rgba(0,0,0,0);) doesn't seem to work on iPhone or Android. Thanks in advance and regards
  • Set focus on alert message ok button

    Hi, I am using the below code to show the alert message               string lstrScriptMsg = "alert('" + astrErrorMsg + "');";             ScriptManager.RegisterStartupScript(this, GetType(), "Alert", lstrScriptMsg, true); During my Page flow I used to show this alert message whenever PDF files are generated.But the actual Problem is This alert message getting displayed behind the PDF file.So I thought of making the alert message box should be the Top of the Current window. So can We get focus on
  • Refresh only portions of the page

    Hello! Typical jQuery Mobile page looks like this: <div data-role="page">     <div data-role="header">...</div>     <div role="main" class="ui-content">...</div>     <div data-role="footer">...</div> </div> If linking to another pages, in ajax response i serve only the <div data-role="page"> ... </div> portion of the new page, without <html>, <head>, etc. sections. Is there any way to refresh only some parts within the <div data-role="page"> ... </div> section? For example I'd like to refresh only
  • How to create charts?

    Hello everyone! For a school assignment I need to create graphs using JQuery UI. They need to be those "bar" graphs. I have googled everything and I can't find anything on Jquery UI forums either. Could anyone tell me where I could start? Here's an image of what I need to create:  Could anyone tell me how I could achieve this?
  • JQuery 2.1.3 in Windows Store, need a dialog box

    I had an app I was working on using JQuery 1.6. I've upgraded the project to JQuery 2.1.3, for a Windows Store app, and for the most part it's working. However, I had a dialog call, that would give the user a message and Ok/Cancel buttons. This fails now. I'm sure I'm just searching the wrong terms. How can I get a simple Ok/Cancel dialog box?
  • JQuery Mobile sort listview after ajax

    hello, how are you?, my application shows a listview after bringing data from a db, but I want it to be organized with respect to the value of a field in the db, but it happens that value is in text, numeric variable is in the index, I need to match the two variables to assign the numeric value before the listview is loaded. I try to use the method sort (), but this only works for organizing the JSON before being loaded. The value "distancia" is the var i need to asign the numeric value. function
  • unicode entered in textfield is not updated using ajax

    Dear All following code uis used to update value stored in textboxex a. ename b. mname   var url= "abcdfill.php";     data = {    ename: $('#ename').val(),   mname: $('#mname').val()   id: sid[1] // record id }        $('#'+savediv).load(url,data)  ; and abcdfill.php had php code to update the record   ename and mname  However if we enter the text in unicode, like  संपादकीय (in devnagari unicode) and try to update the data is filled up with unreadable data. I want data like #0545#0545#0343#1452 instead
  • How to call a function along with load method in jquery

    Hi all, In my application i want to a display a part of another page in current page.using following code $('#ContentPlaceHolder1_btnaddress').click(function (e) { e.preventDefault(); $('#display').load("Address.aspx #Address"); }); this is for displaying a div tag Address in the current page.i don't need complete page. my problem is i want to call a function named display along with above code . how it is possible. if i use $('#display').load("Address.aspx") i will get everything .but i don't
  • How to create a jQuery autocomplete select with the possibility to add/enter a new element when no matching entry exists?

    Hello, I´m quite new to jQuery but still hope to be in the right topic ;) My plan is to use a select element in a FORM thats populated by a JSON file. I want that select element to "assist" the the user in an AJAX way by showing only options, that start with the so far entered characters. If there´s no option that suits the input, the entered data should be sent with the rest of the form data to a sccript that further processes the data on the server. I know, there´s a way to populate the options
  • need help to prepend() to text box

    hi to all  i am having two text boxces if i enterthe values in one text box that is shown in starting of the text box in reverce order <input type="text"  id="tbox1"> <input type="text"  id="tbox2"> $("#tbox1").keyup(function() {$("#tbox2").val($("#tbox1").val()); });   i want to show my text in first
  • How to enable all titles in Page

    Hi, I have used below code to remove the title in the page   $('button').eq(1).focusout(function () {             $('[title]').removeAttr('title');        Now I just want to enable back all titles(Tooltip) in the Page in another event. can you please help me on that? 
  • Accordion active by index since 1.10

    Hi, Why activate an accordion by Id since v1.10 ? (i'am actually in 1.11) this commande not working for example: (working in 1.9) $( "#accordion" ).accordion( "option", "active", '#ui-id-2'); I want to activate an accordion before update but I can not know where it is placed. So I can activate it by ID. Thanks for your help,
  • load error in ajax

    hi to all i new to ajax i tried this one but this is not displaying the my text file which is located in my computers desktop http://jsfiddle.net/jefbxvzo/
  • 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