• jQuery Validate Plugin

    Hi there, In my form named EditWeight a user can click on a button and add one or more textboxes. I want to validate these one or more textboxes to make sure they contain either integer or decimal number.  I added this code and i have two problems. * reg expression that I'm using looks correct but the code always says does not validate * I don't know how to display the error message to use when the textboxes doesn't validate given that I have one or more textboxes.             $('#EditWeight').on('submit',
  • Building custom jquery-ui

    Hi, Is there an instruction on how to build jquery-ui in a similar way to building custon jquery (https://github.com/jquery/jquery). When I am trying to run npm run build I am getting an error : pm ERR! missing script: build? There is build.js in subfolder: jquery-ui\build\tasks. Is there also a list of modules that can be excluded from a build to create smallerjquery-ui? Kind Regards, Janusz
  • group horizontally a textinput and a checkbox

    Dear all, I am trying to design a web site in jquery, but I am struggling with a display problem. I would want to display a search screen with an optional date (optional is selected with a checkbox placed at the right of the date entry field. I tried with an horizontal controlgroup (from http://demos.jquerymobile.com/1.4.5/forms-field-contain/), but each time, the date entry and the checkbox are displayed vertically instead of horizontally. I copy-paste the full html code of a simplified example
  • Can't find mistake, but surely some of you...

    Dear all,  I am using Chronoforms on Joomla and would like to add a JQuery custom code. Since Joomla moved from Mootools to JQuery, I have difficulties migrating the following code. Here's what it does: In short, to register for a debate tournament, field values #debaters, #judges, #observers are multiplied (by a fee) and added together. The tricky part: there is a discount option for every judge you bring more than the number of teams. Now, the number value of teams itself (capped at three) is irrelevant
  • Unable to select just one checkbox

    <input type="checkbox" name="q_4[]" value="scales" /> <input type="checkbox" name="q_4[]" value="horns" /> <input type="checkbox" name="q_4[]" value="claws" /> key = "q_4[]"; value="horns"; $('[name="' + key + '"]' + '[value="' + value + '"]').prop("checked", true); Thank you
  • How to reach this element using jquery?

    Hi, I am able to get the attached return using: console.log(data.e); but I want to know how can I reach the response element to read the document_id? I tried: console.log(data.e.response.document_id); but it's not working.. Thanks, Jassim
  • jQuery event variable scopes and ES6 classes (JSFiddle)

    I'm having some issues getting a class method to fire when events are triggered. JSFiddle Basically, for buttons #1 and #2, you get the alert, but the _selector property is undefined, so obviously the event triggers fine, but it cant see the _selector property.. But for button #3, all thats really changed, is the btnThree.eventHandler(); gets executed from within an anonymous function... But it works just fine. Any ideas? I'm sure it's something simple.
  • I can't get the h1 in the jumbotron to execute the jquery function. Is something wrong with my code?

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">   <head>     <meta charset="utf-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="width=device-width, initial-scale=1">      <title>Twilight Talk - Twilight Zone Blog</title>      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <link href="web-fonts-with-css/css/fontawesome-all.min.css" rel="stylesheet"> <link href="css/twilightzone.css"
  • How can i pass multiple values of fropdowns in url?

    Hey guys,  I'm currently creating a project with Codeigniter and i have some dropdowns which will filter my db results using "GET" method in url. What i want is to pass or replace (if its already in the url) the value of the selected dropdowns ONLY, like an array. A guy helped me on some point but on selecting another dropdown box the value in url is replaced with the last chosen. Could you please help me on that?! P.S.: If you faced the same (filtering results) and you have a different proposal
  • Having Issue on Mouse Hover Between Two Element

    Can you please take a look at This Demo and let me know how I can keep the #panel slide down/open when mouse traveling/hovering between #flip and #panel? and only slide up when mouse is out of theses two? $(document).ready(function() { $("#flip").hover(function() { $("#panel").slideDown("slow"); }, function() {}); $("#panel").hover(function() { }, function() { $(this).slideUp("slow"); }); }); body { padding-top: 20px; } #panel, #flip { padding: 5px; text-align: center; background-color: #e5eecc;
  • Unable to get input type

    <select name="q_1[]" multiple size="6">     <option value="1">Volvo</option>     <option value="2">Saab</option>     <option value="3">Mercedes</option>     <option value="4">Audi</option>  </select> <select name="q_2">     <option value="1">Volvo</option>     <option value="2">Saab</option>     <option value="3">Mercedes</option>     <option value="4">Audi</option> </select> <input type="checkbox" name="q_4[]" value="scales" />Scales <br /> //DOES NOT WORK ---ALWAYS GET undefined  el = $('[name="q_1[]"]');
  • zabbix jQuery working on localhost but not remotely

    Hi, I am using zabbix3.0.20 with apache server. When I access the webpage from localhost it loads fine but when I access the webpage remotely from another machine over the internet the page loads very slowly and incompletely. I get the following errors  Uncaught ReferenceError: jQuery is not defined errors. How can I troubleshoot and fix this? Thanks Reagards, Usman
  • Hide div based on minimum number checkboxes selected

    I wan to show hide divs based on total number of checkboxes selected in the html below. I want to .. 1. Hide div.cart if total no. of checkboxes selected is less than 3 and show div.notice 2. If total no. of boxes selected is greater than 3 hide div.notice and show div.cart.  To sum if up div.cart show only be visible if user has checked 3 or more boxes, if not than user can only see div.notice telling them to select more. <input type="checkbox"> <input type="checkbox"> <input type="checkbox"> <input
  • Dynamic json listview trouble

    Hi  here is my code.  ---------------------------------- <!DOCTYPE html> <html lang="en"> <head>     <title>Page Title</title>     <meta name="viewport" content="width=device-width, initial-scale=1">     <link rel="stylesheet" href="jquery.mobile-1.3.2/jquery.mobile-1.3.2.min.css" />     <link rel="stylesheet" href="css/app-3.css">     <script src="js/jquery-1.9.1.min.js"></script>     <script src="jquery.mobile-1.3.2/jquery.mobile-1.3.2.js"></script>     <title>test 4</title> </head> <body>    
  • $.on('keydown mousedown',...), force caret to the end of the node

    Inside of a contenteditable, say that the caret is inside of a specific node (in my case, <q data-em="1"></q>&nbsp;). How can I immediately kick the caret outside of the node, past the ending tag? I'm using the same loop that Jake helped me build in another thread to find when they're within the Q element: $('[data-ce]').on('click keydown', function(e) {      var node = getSelection().anchorNode.parentNode;       while (node && node.hasAttribute && !node.hasAttribute('contenteditable')) {             console.log(node.nodeName);
  • get a value(text) from a span element to a input element ?

    how to get an span element text to a input element and then grab the input element value and display it as a list below?  From the code below, when I click the btnGET I would like to put the 8:00 pm into the <input id="txtTime" type="time" /> and then again get the new value of txtTime and display it as a list below when btnSET is clicked ..I am doing this to check how the type time will change the type of user input...Same is the case with EMAIL span as well..  Thank you in advance.. Ex:  <div>
  • How to prevent form submit for href within a form?

    Hi, I have this form: <form id="FormSignin" name="FormSignin" class="login" autocomplete="off">     <h1 class="login-title">مركز الإمام الصادق عليه السلام</h1>     <input id="email" name="email" type="email" class="login-input" placeholder="البريد الإلكتروني" autofocus autocomplete="off" required="true">     <input id="password" name="password" type="password" class="login-input" placeholder="كلمة السر" autocomplete="off" required="true">     <img id="ImageSigninLoading" src="images/loading.gif"
  • How to append data to bootstrap data table?

    I am getting the data to display but the table says "No data available in table" then it displays the database data and it does not allow me to do any of the built in features that come with the bootstrap data table like sort columns of pagination. Here is my code: <div class="table-responsive"> <table id="datable_1" class="table table-hover display pb-30" > <thead> <tr> <th>Product</th> <th>Variation</th> <th>Department</th> <th>Category</th> <th>Air/Boat</th> </tr> </thead> <tbody> </tbody> <script
  • Jquery selector on Django loop

    So I have this It looks like this: https://gyazo.com/0b329d87af9372250a53ae25347b59b0 I need to select the items name when the user clicks on the anadir_button. Something like $('.producto_precio').last()clone().appendTo('#list_pedidos'); But this one just selects almendras, bananas and bolson frutal {% for producto in reparto_martes %}        <div class="col-md-3">         <div class="card mb-4 box-shadow product-box">           <img class="card-img-top product-photo" data-src="holder.js/100px225?theme=thumb&amp;bg=55595c&amp;fg=eceeef&amp;text=Thumbnail"
  • CHelp to create JSON

    Dear Sir/Madam I came as across https://codepen.io/prajaktasoftware/pen/yqqgrV My difficulty is to stored the changed data  in database so that changes can be stored and retrieved pl help how can i do it
  • $.ajax('s done not called

    Hi, I have below simple ajax call to post a form. the form is being successfully posted and data were saved to the database but the problem here is my done is never been invoked and i am not getting the console.log("done") nor the rest of the done code. where is the issue here please? $.ajax({ method: "POST", url: "save_student.php", data: $("#frmNewStudent").serialize(), dataType: "JSON", beforeSend: function() {      $("#ButtonSaveNewStudent").hide();      $("#ImageLoading").show(); } }).done(function(data)
  • Upload File & Data Problem

    I'm using FilePond & it passes the file to you in a function.  I'm trying to do a simple file upload w/ additional upload data.  Here's my js: function fpUpload(fieldName, file, metadata, load, error, progress, abort) {           console.log('InsideFP-Upload: ' , upload); // set further up           console.log('InsideFP-File: ' , file);           var obj_data = {};           obj_data['upload'] = upload;           obj_data['myfile'] = file;           var imgData = new FormData();           $.each(obj_data,
  • Jquery Pagination for list of items which is collapsible

    Hi everyone, I have a question related to Jquery Pagination for list of items which is of tree structure.  Items are collapsible and expandable.  I have to do search in these items which has to high the items.  Kindly suggest me is there any plugin available or do I need to implement from scratch.  Thanks in advance.
  • Why don't work button???

    $(document).ready(function() { $("#createStudentForm").unbind('submit').bind('submit', function() {             var form = $(this);             var formData = new FormData($(this)[0]);             var url = form.attr('action');             var type = form.attr('method');                          $.ajax({                 url : url,                 type : type,                 data: formData,                 dataType: 'json',                 cache: false,                 contentType: false,                 processData:
  • Test if class exists on the site

    Is there a way to check if a class that's assigned to something is actually defined on the site? I'm specifically working with content posted into a contenteditable. If they copied from my site then I want to keep the classes, but if they copied from another site and are bringing over classes from that site, then I want to remove them.
  • Multiple Date Picker, getting dates

    I am using this example to select multiple dates http://jsfiddle.net/7613s2hu/2/?utm_source=website&utm_medium=embed&utm_campaign=7613s2hu So far so good but i need to get the values selected on the calendar. I added a label with the below code     <script language="javascript" type="text/javascript">         document.getElementById('DatesLabel').value = $('#mdp-demo').multiDatesPicker('getDates');     </script> but each time i click a date on control the label shows as empty. My guess is to target
  • grab data-* value from DOm and print unordered list

    I want to loop through all label elements of my page and grab their id and data-myvalue values and  show them as an un-ordered list below the div... How can i achieve this   Example  <div>         <span>     <label id="SA.MC.AMC.Breakfast" data-myvalue ="2"></label>     <label id="SA.MC.AMC.Breakfast.Output" data-myvalue ="4"></label>  </span>     </div> The un-odered list should be like this <ul> <li>SA.MC.AMC.Breakfast  :2 </li> <li>SA.MC.AMC.Breakfast.Output  :4 </li> <ul> Thank you in advance
  • Making textarea draggable in jquery UI

    Just discovered jquery ui library which appears to offer everything I need to develop a web interface for a timetabling application. However it all hinges on being able to drag a textarea. For the moment I just wish to know if it is possible. It is then up to me to get investigating. Thanks 
  • $(event.target) works on click, but not keydown... alternative?

    I have this script working just fine when I click on it using the mouse, but it doesn't trigger the while() loop if I move to it using arrows:  $('[data-ce]')       .on('keydown click', function(e) {             var node = $(e.target);             while (node.is('contenteditable') !== 'true') { alert('node - ' + node[0].nodeName); alert('this - ' + this.nodeName);                   if (node[0].nodeName == 'B' && !$('[data-richcont="B"]').hasClass('richbuttonOn'))                         $('[data-richcont="B"]').removeClass('richbuttonOff').addClass('richbuttonOn');
  • How come the other answer won't display upon alert? The only thing that displays is "not quite try again". PLEASE HELP

    <p>What was the name of the book featured in the firsrt episode of the first season?</p> <form><p><input type="text" id="guess"> </p></form> <p><button id="checkGuess">Guess!</button></p> <script> $("#checkGuess").click(function() { var AnswerEntered = $("#checkGuess").val(); var guess = "The Last Man Alive"; if ($(AnswerEntered) == guess) { alert("You got it, your a fan!"); } else { alert("Not Quite, try again"); } }); </script>
  • jQuery addClass to all img

    Hi. I'm having some issue on FAQ page. The basic FAQ is the dropdown image doesn't have any class or id. We want when user click the question it toggle open and i'm using jQuery to add some class on the image. But the issue is it add the class on all the image question, not only current toggle question. How can i achieve this? Can someone guide me. Here is the script that i'm working for. {source} <script type="text/javascript">     jQuery(document).ready(function(){     jQuery("a").click(function(){
  • How to read a text box value and copy it to another one?

    Hi, I have a List View and above it, there is a filter... The filter is any text entered by the user... How can I copy the value the user enters in that box and copy it to a another box? The background is I;m using K2, we have a listview, above it is a Built-in feature to filter results, we want to capture what the use types in that filter and then use the value to trigger a report using that filter value. At the moment, we can't do anything with that filter value, so hoping jquery can somehow copy
  • Put <td> below <th> having similar values

    Hi folks, Actually I have a table organized in this way : CompanyName | Red | Blue | Yellow company1 Blue Yellow Red And I would like to dynamically put similar elements bellow <th> having the same value CompanyName | Red | Blue | Yellow company1 Red Blue Yellow Many thanks for any help in these regards. Below is my try.. but doesn't seem to be successful var headers = []; var row = []; $("#dashboard > thead > tr > th").each(function(k,v){ var header = cleanHeader($(this).text()); $("#dashboard >
  • How can i repeat a SVG animation with Jquery ?

    Hi, How can i repeat a svg animation with jquery loop ? So that each time i can give different color to the draw line. Below is my code. This is the fiddle, https://jsfiddle.net/Lsau2h4t/2/ The aim is i want to draw the line with different colors each time one color, Eg: First red, Second repeat green, third repeat yellow etc.. How can i do it ? Thanks in advance.
  • Getting error while creating InputTextArea on button click using jQuery in jsf

    Hi All, I want to create InputTextArea dynamically on button click. While doing so, getting the following error. Code: <h:head>             <f:facet name="first">                 <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>                 <title>TxtArea Dynamic</title>             </f:facet>             <h:outputScript library="primefaces" name="jquery/jquery.js"/>             <script type="text/javascript" src="jquery-1.3.2.min.js"></script>              <script type="text/javascript">
  • can jquery support a menu sending files to 3 different DIVs on the same page

    I am trying to update from frames to flexbox.  Now i am trying to use jquery.  I have succesfully been able to load  the menu from the first div into the second.  But sending files from the second div to load into the third nothing I try works. The first div holds a master menu. the second holds a submenu.  The thrid div is for viewing files.  Id like to actually have a fourth DIV  for viewing files as well.  This is a large educational tool I build in frames.  With the target command I have no problem
  • Is it faster to use .hasClass() before removing classes, or just go ahead and remove it?

    I'm not quite sure how to test this for myself, but I'm thinking this might be a rookie question, anyway. Is it generally faster to test if an element has a class assigned to it before removing it? Or is that just doubling down on the processing time whether it's true or false, in which case it would be faster to just remove it without testing? if ($('[data-richcont]').hasClass('on'))       $('[data-richcont]').removeClass('on'); And does the same stay true if I use removeClass('on').addClass('off')?
  • Add google tag manager with jquery on the head of html document

    First of all thanks for letting me be a part of this forum.  I need to place google tag manager with jquery on a webpage, but I'm new to jquery world and after several trials without success I decided to come here to may get some help. Sorry about my English, I'm still learning.
  • Sortable flicker when dragging portlets

    Hi there I am using the portlets example from the JQuery sortable website. We have set the tolerance to "pointer" as below:     $( ".column" ).sortable({       connectWith: ".column",       handle: ".portlet-header",       cancel: ".portlet-toggle",       placeholder: "portlet-placeholder ui-corner-all",       tolerance: "pointer"     }); When dragging a widget over another widget which is off the top off the page, the widget and page flickers very fast. This issue happens in the Chrome browser (Version
  • Reorder numbers in string

    I have a string with numbers: 10 9 8 11 I need to reorder them so they are in order like this: 8 9 10 11 So I'm using this function: strToAppend = strToAppend.split(' ');                 strToAppend.sort(function (a, b) {                     if (isNaN(a) || isNaN(b)) {                         return a > b ? 1 : -1;                     }                     return a - b;                 }); That works but the problem is that the string comes out like this: 891011 How can I reorder and still keep the
  • 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