• jquery-boilerplate is giving some error

    Hi, I'm trying this boilerplate template. You can see the demo. Clicking on submit button is giving me error: this.submitForm is not a function I have no idea what's wrong here? This function is working fine when calling from outside click event braces but it's not getting called from inside. I would like to know the template I'm using follows the correct trend along with latest jquery. If not please point me in the right direction for choosing the template. Cheers Prashant
  • Finding distance between two elements

    Hi, I'm at my wit's end now, though it's not jQuery issue I venture to post it here for thoughts. And here's the description. ... <table id="beforeG1"> ... </table> <table id="G1">  ... tons of elements etc.  <tr> <td id="g11" onclick="findDepth();"></td> </tr> </table> function findDepth() { // find distance between G1 click to add g11 and the element before G1 /* there could be multiple SAME 'G1' id and multiple SAME 'g11' id */ // var node = document.getElementById('g11'), //g11[0],  var node
  • Filter Content Based on Dropdown List Selection.

    How Can I make these 3 dropdown lists to filter the content. They are filtering it individually at the moment. How can I make them filter if 2 or 3 choices are selected. JSFiddle link is attached? https://jsfiddle.net/8no2j42m/
  • Upload file and JSON data in the same POST request using jquery ajax?

    Hi,  I am trying to send a POST request using jQuery Ajax, where I would like to upload a file and some json data. Please find below code, var logoImg = $('input[name="logoImg"]').get(0).files[0]; var formData = new FormData(); formData.append('logo', logoImg); var objArr = []; objArr.push({"id": id, "name": userName}); var obj = [{"objArr":objArr, "formData":formData}] ; $.ajax({     type:"POST",     url :url,     dataType:"json",     data : JSON.stringify(obj),     contentType:"application/json",
  • Guidance on pulling JSON data send through textarea

    Hello I am new in Jquery.I have a HTML form with textarea and a button,I have mapped the button to Javascript action and send the data entered to a REST API and pull JSON data and show same.I am using REST API of GATE cloud for sentimental analysis.I have the key and password.Kindly tell me how to structure the JSON script and format the URL with POST data containing api key and password I wanted the javascript to handle in the manner (function ($) {     $('button').on('click', function () {    
  • CSS Transition Infinite Loop

    I have a CSS transition that I want to loop infinitely. I put it on plunkr but it doesn't loop there at all. You would have to create a Web page from the plunkr in order to see it loop. Here is the plunkr:  plonkr
  • JQuery Validate Does Not Properly Work. What Am I doing wrong? Validation Problem

    Hello, I have been trying to solve this issue for a long time. Here are the highlights of my problem: I have written code using C# which builds a JSON object and sends it back to the client-side via AJAX. Within the JSON object are validation rules, messages, and a dynamically built HTML form. I append the form to a static DIV in the HTML page. As I iterate through the JSON object, I dynamically add the rules to the individual, dynamically-built form elements. The rules appear to be added fine. Sometimes
  • how to check file name?

    hi guys need some help. i have written a code that checks now if i have uploaded 2 file with the name which have been defined. but now i would like to check for each file name and show an alert message to the user which file name is missing.                          var files = $('#file').prop("files");                         var fileNames = $.map(files, function(val){ return val.name; });                         var toCheck = ["Query", "Entities"]; $.each(fileNames, function (i, name){ var Filename
  • How to make the datepicker display a german date format?

    This seems to be a question nobody is ever asking but me: How can I get a date format like "25. Dezember 2016" instead of "25 Dezember 2016"? Right, the dot makes the difference. I use Quform, which offers already a bunch of date formats out of the box. The one I need isn't there. Is that a datepicker js affair? How? Where? What to do? Help urgently needed.  Matthias
  • Prevent image loading to show

    Hi, I am using below to show an image based on date and if not then display default image. It is working beautifully but I only have one problem. I am displaying a loading screen until the image is displayed but it is not happening and the loading will go off before the image is display then the user will see the image loading which is ugly How can I fix this please? $("#imgHomeSplash").attr("src", "https://people.softnames.com/images/home/splash/NASSER/" + special_date + ".png"); $("#imgHomeSplash").on("load",
  • Eklenen sayfaya liste menusunden bağlanamama

    Dreamwear jquery de yapmış olduğum uygulamada 8. sayfayı eklediğim zaman 5.saffadaki liste üzerinden a href #page8 bağını kurmama rağmen sayfaya bağlanmıyor?nedeni neolabilir..ii aksamlar
  • Array

    I have this array: var aLang = new Array(5); aLang['fr'] = new Array(350); aLang['en'] = new Array(350); aLang['es'] = new Array(350); // [languish] [key] =" item text" aLang['fr']['Menu1'] = 'Acceuil'; aLang['fr']['Menu2'] = 'Programs';         //---- Key         aLang['fr']['3'] = 'jQuery';         aLang['fr']['OP'] = 'cSharp';         aLang['fr']['OC'] = 'C++';         aLang['fr']['OM'] = 'Lisp';         aLang['fr']['OMT'] = 'Fortran'; //Html tags                     <li><a  key="Menu1"  class="ctext"
  • wrapAll around two elements?

    Hi, I'd like to wrap a section around two elements. What I understand from wrapAll is that I could only either wrap all h4 or p but not combined... The current structure is: <section id="questions">       <h4>Question</h4>       <p>text></p>       <h4>Question</h4>       <p>text></p>       <h4>Question</h4>       <p>text></p> </section> I'd like to archive: <section id="questions">       <section class="question">             <h4>Question</h4>             <p>text></p>       </section>       <section
  • How to load two or more popup in sequence

    I wanna use JS to load two or more popups in sequence, after i close the first popup, then display the second one . but it looks not working $("#popupMSG1").popup('open'); $("#popupMSG2").popup('open'); how can i do that?  thanks a lot!
  • Make 6 divs look like grid but with 2 ways to scroll??

    This is really more than a JQuery problem and any help would be greatly appreciated. I've created a .JSFiddle of my problem. I've got a grid cut up into 6 div tags. Top1             |       Top2 Mid1             |       Mid2            <-scrolls vertically Bottom1       |       Bottom2      <- scrolls horizontally Mid2 and Bottom2 are set in css to scroll-y & scroll-x respectively. the rest are set to hidden. When Mid2 scrolls (vertically) I need Mid1 to scroll with it but leave Top1, Top2, Bottom1
  • Sortable distance deprecated NO NO NO NO

    This is NOT a brilliant idea.  The reason given is user interaction should be instant and / or handles should be used.  This is absolutely not true.  For instance, you may have items that can be clicked OR sorted... clumsy clicking will move the object a pixel or two instigating sort when the user needed a click.  I know of several cases like this where a single click evokes help, a double click evokes and edit or dragging evokes a new position... as in navigation editors, etc.
  • How to use php function inside javascript file?

    Hello i have this function for languages using php function lang($var){ return $var; } when i write  <?php echo lang("test lang"); ?> the function output will return ( test lang ) so now is my question how can i use this function inside javascript without creating another languages function to use it inside javascript, all i need is i want to convert or another idea to use php function inside js files. Kind regards.
  • JQuery UI resizable grid, inconsistent behavior depending on grid value, jquery-ui version

    I need a resizable bar that can go all the way to no bar. Depending on how what I set the grid to, sometimes I can, sometimes I can't. The values I try are multiples of the initial size of the bar. Here are examples Working: https://jsfiddle.net/dg851voo/ $("#app-interactionAdjustingTheFractionBarsSTART-question-bar-5").resizable({   handles: 'n',   grid: [0, 60] }); Not working: https://jsfiddle.net/xmzj3x54/ $("#app-interactionAdjustingTheFractionBarsSTART-question-bar-5").resizable({   handles:
  • Native jQuery date format

    Hi, Is it possible to format a date without having to use a pluging? I mean native jquery only? I want to get the current date in ddmmyyyy.. for example: 21122017 01072017 Thanks, Jassim
  • Check if image exists on server

    Hi, I am trying to check if an image exist on the server then I can display it otherwise display a default image. Using below code: $.ajax({     url: 'https://people.softnames.com/images/home/splash/NASSER/4.png',     crossDomain: true,     success: function (data) {         alert('exists.. display this image');     },     error: function (data) {         alert('does not exist. display an alternative default image here;');     }, }); but it returns an error although the above url does return an image.
  • SyntaxError: missing } after property list

    Here is my json data. Json validator shows this is valid in javascript. But I got error of missing } at position 78 (  jquery.jqGrid.src.js:1:78). {"total":1,"PageSize":1,"Page":1,"records":10,"rows":[{"id":"CaSNP01900516","cell":["CaSNP01900516","Ca8","2449175","Substitution","T ","C ","Ca_02342","Uncharacterized protein At1g04910"]},{"id":"CaSNP01900521","cell":["CaSNP01900521","Ca8","2449198","Substitution","T ","G ","Ca_02342","Uncharacterized protein At1g04910"]}]} let me know why this error.
  • How to play single audio file where the page has more mp3 audios?

    I have downloaded one Jquery mp3 audio player and tried to incorporate more mp3 files in a page. Everything works fine but I want to play any one audio at a time. Right now all the files are playing. So if I play a song rest files needs to be paused and change the respective icons. Please check this fiddle and help me to sort out thanks.
  • Selectmenu Jquery UI change event on pageload

    I'm currently using JQuery UI SelectMenu Widget in my application. The options in the selectMenu are filled at runtime based on some values in sql tables. Based on the option selected in the selectedMenu a datatable needs to be filtered on a specific column. .Js snippet $(document).ready(function() {     var table = $('.tableContent').DataTable({         "columnDefs" : [ {             "className" : "dt-center",             "targets" : "_all"         } ]     });     $("#osFamilySelect1").selectmenu({
  • Problem using nth-child selector inside table

    Hello, I have a problem with the nth-child selector by using it with Jquery. Normally my code defines what I want, but either there is a conflict between my row and column selections or I do not use the correct selectors or there is a bug in the browsers. JSFiddle Problems : A) Friday from 12:30 pm to 1:00 pm should not be in black since the club is open from 8:00 to 21:30 B) the club closes at 19:00 on Saturday - all time slice from 7:00 pm must be in black color. The problem (A) should not be displayed
  • Trouble Installing Paver Plugin

    I'm coding a website for this charity event and although I can write HTML, I have no experience in java or jquery, as you can probably see by the code. I have managed to implement 2 plugins so far - FadeThis and Shine.js however upon trying to install Paver to add a panorama to the page, I somehow broke it and even when the page was working, the panorama aspect didn't. I will eventually get round to learning jquery however at this point I would appreciate if someone could help on this specific task
  • Unexpected Behavior of jqGrid when placed on Dialog

    My app calls for a jqGrid to be placed on a jQuery-UI Dialog.  I can make the grid appear as desired, but when it does all controls (including close window) on the Dialog become non-functional.  It almost appears as though the grid is operating modal and preventing interaction with the underlying dialog. I have tried various combinations of modal and non-modal attributes in both the dialog and grid, but I can't seem to get around this. Suggestions?
  • Checking if video source is empty

    I have 20 videos displaying onto screen. How can I check if any of the video src's tags are empty <source src="" type="video/mp4" /> Here's my script so far $('video').children().each(function(index) { //console.log(index + " " + $(this).attr('src')); if($(this).attr('src').length == 0){ console.log('hide' + index + " " + $(this).attr('src')); $('.row-5 div.col-1-5 .icon').addClass('disable'); $('a.icon').removeAttr('href'); $('div.vid').hide(); } else { console.log('show' + index+ " " + $(this).attr('src'));
  • Tag it help

    First up, I'm using this script. https://goodies.pixabay.com/jquery/tag-editor/demo.html Below is my code, I've included these scripts and they link okay. <link rel="stylesheet" href="CSS/jquery.tag-editor.css"> <script src="Resources/jquery.caret.min.js"></script> <script src="Resources/jquery.tag-editor.min.js"></script> THis is my error which I get AFTER I type 2 characters... jquery-ui.min.js:23 Uncaught TypeError: Cannot read property 'length' of undefined     at b.(anonymous function).(anonymous
  • display 2 type datepicker in one

    hello i have a plugin for show gregorian and jalali datepicker: https://amirkabirdataminers.github.io/ADM-dateTimePicker/ but i want show both in one calendar exm attach file. ( exm: <span>Day Jalali<br>Day Gregorian</span>) please help me how can i this?
  • focus on input field

    So I have multiple text fields in a form, and when they click on the input field a hint will come up like Example - john@doe.com. Not as an alert, but show up beside the field and then fade away. I have 4 boxes I am trying to do that for, but I need a way to tell the boxes apart. this will just show all 4 messages at once (document).ready(function() {     $("input").focus(function(){         $("span").css("display", "inline").fadeOut(2000);     });
  • call a function within $(document).ready(function() {

    First of: I know it's something which has been written (well, typed) about a lot, but even though I found workarounds, I haven't been able to get around this limitation. To get into details, a while ago I set up a page with a Highcharts graph, most of the code is pretty much the same as https://blueflame-software.com/using-highcharts-with-php-and-mysql/ , I based it on that. The data.php was originally written in such a way that it got the data from the MySQL database between the moment of accessing
  • What could result in the following jquery-3.2.1.min.js error?

    jquery-3.2.1.min.js?_=1501353680880:2 Uncaught TypeError: $(...).on is not a function at HTMLDocument.<anonymous> (<anonymous>:3:25) at j (jquery-3.2.1.min.js?_=1501353680880:2) at k (jquery-3.2.1.min.js?_=1501353680880:2) Switch to jquery-1.8.0.min.js resulted in the same.
  • TypeError: $(...).Jcrop is not a function

     var jcrop_api, boundx, boundy;         function updatePreview(c) { // croping image preview             if (parseInt(c.w) > 0) {                 var rx = 220 / c.w, ry = 220 / c.h;             }         }         function showCoords(c) { // show all coords             $('#x').val(c.x);             $('#y').val(c.y);             $('#x2').val(c.x2);             $('#y2').val(c.y2);             $('#w').val(c.w);             $('#h').val(c.h);         }         $('.thumbnail-img').Jcrop({             onChange:
  • Loops and array

    Im just starting to learn jquery and having a bit of trouble with loops. I am trying  to create a variable array that contains certain product names, if the product name in the array matches the heading inner text, then add a class to the product image. I have come up with the below which works fine when there is only one individual product in the variable, but if i add more than one product to the variable, it breaks. Can anyone tell me where I'm going wrong? Code looks like this so far: var product
  • What are some of the jQuery UI functions/plugins we can't live without?

    DatePicker is one. Feel free to add your pick below:
  • passing javascript variable to form

    I'm a newbie to Javascript and from what I've read I assume there is a much better way to my approach, but here it goes. I have a form with onclick such that when a clear image is clicked on in a table cell, the background pic of the cell changes (showing that it has been selected, or unselected if clicked again). That all works, now I want to define some variable so that when the form's Submit button is pressed, a form variable is passed showing whether or not the user selected that option. The
  • get the content of cells when selection by column (selectable)

    Hello, my question is quite simple, but I can't manage to make it work properly I have a table and I want all cells of the table to be "selectable" by using the selectable plugin of jquery UI here below my table : <table id=\"selectable\"> <tr> <th class=\"ui-widget-content\"> A </th> <th class=\"ui-widget-content\"> B </th> <th class=\"ui-widget-content\"> C </th> </tr> <tr> <td class=\"ui-widget-content\"> 1 </td> <td class=\"ui-widget-content\"> 2 </td> <td class=\"ui-widget-content\">
  • how to reverse bit?

    Hi, I don't know how to explain but let me put it this way.. I have this in my js file: visible: is_organization this should be reversed so if is_organization is true then visible should be false and it should be in the same way, I mean: visible: is_organization and not with if statement. How can I do this please.. Thanks, Jassim
  • How to allow special characters in jQuery “contains”?

    Original question asked here . So when this function is triggered it selects an item in a list via filtering elements with that class and with the text that the user provides through the var text.  If the above exists then it simply clicks that element, else show an error.  However if the user provides text like "hi(hello world)", this would be seen by jQuery as part of the function and not text, so it doesn't work.  So any special characters like "!/-()" will be seen as part of the function and
  • Bootstrap Multiselect Issue

    Hi, I have the following code, taken from Bootstrap Multiselect: nonSelectedOptions.each(function() { var input = $('input[value="' + $(this).val() + '"]'); input.prop('disabled', true); }); The above works, as it disables all items in dropdown A but it is also disabling items in dropdown B because this line doesn't specify the dropdown ID/class: var input = $('input[value="' + $(this).val() + '"]'); So if the index was 5, it will set 5th items in all dropdowns on the current page as disabled. Any
  • 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