• How can I switch Play Button in Js Image Slider when it stop from looping?

    I'm programming a js image slider. I made a script to stop the loop, but when it stop  there's still the pause button visible, even though I can click on it and the slider start again. I think I need a script for it. I post the code. Here it's the js in the body: //The following script is for the group 2 navigation buttons.         function switchAutoAdvance() {             imageSlider.switchAuto();             switchPlayPauseClass();         }         function switchPlayPauseClass() {            
  • Attempting to "clear" or "reset" drop-down selectors

    Hello all, I'm trying to set up a function on button click that will reset currently selectors with selected values back to the default or first selection of "(All)". Here is the code I'm trying that doesn't seem to work:        $('div[k="W10573"]').click(function(){                 $('div[k="W6038"]').val($('div[k="W6038"]')[0].defaultValue);                 }); with W10573 being the button and W6038 being the selector.  I know the button is working as I tested it with an alert("TEST"); which worked
  • Row identifier in jQuery

    Can we access a row of a table only if it's updated by jQuery? A table is rendered to JSP UI. The table has data and approved combo box with yes/No values at each row. So each row in the table may or may not be updated. Only if a row is updated then that particular row is identified and will be sent to update to database through a hibernate session. Can we access each row of a table in jQuery in any way ?
  • beforeSend not working with async

    Hi, I am using below ajax with async = false but my issue is it is not showing the loading panel in beforeSend. However, if I change async to true then beforeSend will show the loading panel. How can I overcome this issue? // Savanna.ShowLoading(true, "Please wait.."); var formData = new FormData(); formData.append("customer_id", customer_id); $.ajax({     type: "POST",     url: "https://www.domain.com/get_customer_by_id.php",     async: false,     data: formData,     dataType: "json",     processData:
  • Need latitude and longitude from centre of a city

    https://maps.googleapis.com/maps/api/geocode/json?address=chennai,india i need a lat long of each bounds from city centre  ex: center to north, center to east, center to west, center to south 
  • Jquery Widget - where to put code for 2nd link to remote javascript...

    I have written a widget and it works great, but right now I am giving my users a link to a remote script, a link to my script and a div to place on their page. I would like to reduce this to just a link to my script and the div. The remote link I want to include in my code below is <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> Can anyone please educate me on how and where to add this link to jquery-ui.js link in my code? I already link to a remote jquery and a remote stylesheet,
  • Using multiple elements with variables

    Hi, I know that I can apply multiple elements like this: $('.element-1', '.element-2').show(); But if I put those elements in variables like this: var $elem-1 = $('.element-1'),     $elem-2 = $('.element-2'); How should I change this: $('.element-1', '.element-2').show(); to use with those variables? Thanks
  • Trying to trigger an ajax call

    Hi Folks,     I'm trying to call a controller with an Ajax request though the url user/MyAjaxCall.  console.log() prints some irrelevant url as and call not biked. Please give me a clue to proceed and I'm struck. Below is the code. I'm trying package net.practice; @Controller @RequestMapping(value = "/user") public class UserController { @RequestMapping( value = "/MyAjaxCall", method = RequestMethod.POST) @ResponseBody public String MyAjaxCall(@RequestBody User usrObject, @ModelAttribute("model")
  • Jquery Tab Widget Losing Formatting

    I built this same tabbed system using PHP and it works great, now I am trying to get it to work as Jquery and am *almost* there!  I am trying to load my well-formatted JSON data into a tabbed structure. So far the data is in and showing up where it should. My problem is that the style is being dropped from the li element and I believe it is because of how I set up my javascript in the JQuery.each section. Does anyone have any idea how I can fix this? Here is the function I use to callback the data:
  • Jquery, JSON and tabs

    I am new to JQuery and need some help understanding how to structure my code...  I have a working JSON page and have been able to get my code to display the intended results.  Now I want to put those results in a tabbed format.  Basically the title of my article is in the tab and the body of the article underneath.  My code right now shows all of the titles in the tabbed area up top, which is correct, now I need to get the body in the main part.  The final structure should look like this: <div id="tabs">
  • Display inside tag correctly

    I have seen a lot about parent tags, and I really do not understand the reason for not returning the result correctly within the id informed. In my test I have two columns with class `.col`, one column has the form, and the other column contains the table list. Form And table list All page content displayed within the id = "ajaxList". The screen looks like this after the first click, and clicking on the other links ajax continues to load the correct contents of each number. Jquery     $(".page-link").click(function
  • Using Croppic Plugin !!!

    var croppicHeaderOptions = { doubleZoomControls:false, rotateControls:false, cropUrl:'/Web_Service/ImageUpload.php', cropData:{ "ID":localStorage.getItem('Id'), "token":localStorage.getItem('token') }, customUploadButtonId:'cropContainerHeaderButton', modal:false, imgEyecandy:true, imgEyecandyOpacity:0, processInline:true, loaderHtml:'<div class="loader bubblingG"><span id="bubblingG_1"></span><span id="bubblingG_2"></span><span id="bubblingG_3"></span></div> ', onBeforeImgUpload: function(){ console.log('onBeforeImgUpload')
  • How can I use jQuery plugins predefined events?

    How can I use jQuery plugins predefined events? Most of jQuery Plugins introduce predefined events in their documentations, Is there any general standard rules for implementing those events? For example in special case Zebra Accordion plugin (a tiny accordion plugin for jQuery) or any other plugin defines some Events like below: Zebra Accordion Events: onClose: Event fired after a tab is collapsed. onOpen: Event fired after a tab is collapsed. If I want in this case to add a div with special font
  • Issue with displaying array values with static text

    Hello all,  I have another question connected to my question from yesterday involving the array issue that Jake was kind enough to help out with. Here was the code from yesterday to establish the array from a multi-select:        var test = $('div[k="W8748"] .elem').map(function(){  return $(this).text()  }).get(); This works great for grabbing the values but what I'm trying to do now is essentially be able to display those values with some static text attached.  Example below. I have two values
  • Start one animation after the other is finished (infinitive)

    Hi, Looking at this Pen: Animation I like to achieve that the animation of the second element starts only after the animation of the first element is finished. When the animation of the second element is finished, the animation of the third element should start and so on (infinitive). Please feel free to change the code as you wish. Thanks
  • textarea and/or its div parent not responding to mouse events

    Click, mouse up, etc do not seem to be working correctly. Kind of at a loss as to why jQuery is not attaching the events correctly, and/or firing them upon the events. Keyboard navigation seems to work just fine; handling the tab keys, arrow keys, and so on, works just fine; I am able to select the container div and drill into the textarea within to give it focus. No problems there. However, how come the mouse events not work properly, not firing on the elements for which I've attached them? Apparently
  • Update Jquery version form 1.8.3 to 3.2.1,All ajax calll fails

    Hello,  I have updated Version of Jquery from 1.8.3 to 3.2.1.My project fully developed and all Ajax works fine in 1.8.3.But after upgrade version all Ajax call fails.it says 401 Unauthorized in response. I have no authentication process. So whats problem? Sample Ajax looks like...(which was works fine in 1.8.3,but same code not works after upgrade)       jQuery.ajax({             type: 'POST',             contentType: 'application/json; charset=utf-8',             dataType: 'JSON',            url:
  • Target escaped div string

    Trying to target a div that may have some special characters in it & then change it's srcset. Everything is coming in correctly, so it's just the targeting part that I need help with. I broke it down into parts to be able to concatenate & then target it: var smdiv = 'mydiv_rowset_'+rowset+'_'+mydata[rowset].fieldNames[k]; var smesc = smdiv.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\\\$&"); var smimgsrc = ' source\\\\.img2xsm'; var small = '\\\\#'+smesc+smimgsrc; console.log('SmImg-small:
  • Need help with possible array situation

    Hi all, My issue today is that I have a search box selector and I'm trying to find a way to: A)  Find out if there are any values present B)  If they are present, how many are there ie.. >1 C)  How can I grab all of the values to display? I have a snippet from the HTML.  I'm thinking I need some sort of For Loop or something along those lines, but I'm not sure how to get it started.  In the case below, I can get it to display the first value "32421" by looking at the ".elem" class, and if it's the
  • chained or dependent auto complete

    $(document).ready(function () {      var availableTags = [ "India", "United States", "Qatar" ] $( "#tags" ).autocomplete({     source: availableTags,     select: function( event, ui ) {         $( "#version" ).val('');         //alert(ui.item.value);         var selected_val = ui.item.value;                 if(selected_val == "India")         {  var states: [ "Tamil Nadu", "Karnataka", "Kerala" ]; }         else if(selected_val == "United States")         {             $( "#version" ).autocomplete({
  • Error in latest release does not load on windows 10

    Windows fails to load due to an error on line 3887 3855 jQuery.Deferred.exceptionHook = function( error, stack ) { 3867 jQuery.readyException = function( error ) { 3887 ...catch( function( error ) { Jquery-3.2.1.js Line 3887 char 4 Error Expected Identifier code 800A03F2 Source Microsoft Jscript compilation error Same error on Google, Opera, Edge
  • Prevent default and then refresh form normally

    Form is submitted through jquery code $("#myform").ajaxForm().submit(); On the other hand I have another submit button on the same form which triggers fine but it triggers through jquery without refreshing the page and i want it to refresh the page without jquery as a default behavior. How can i do so? I tried something like below but it still submits using jquery. Any help would be highly appreciated in this regard. $("#Save").click(function(e){                 e.preventDefault();         $('#myform').submit();
  • Issue with two submit buttons

    HTML FORM looks like below:  <form id="biz" name="biz" action="CGI.script" method="post" onSubmit="console.log('submit button, not save button, clicked'); if (document.getElementById('field1').value=='$'){alert('Liability is required');return false} else if (document.getElementById('field2').value=='$'){alert('Fee is required'); return false};">          form field 1          form field 2          form field n          ...          lots of fields...          <input type="submit" id="save-and-continue"
  • Automatic data saving issue

    Where's no problem using an event to call an ajax call for a data saving function (saveData), but timed, automatic data saving by calling this function at different interval failed without error.  See code below.  Know why? Thanks in advance.   /* auto data saving; */   // try 60 seconds first setTimeout("saveData()",60000);   var saveData = function() { // use jQuery to send form $(document).ready(function() {  $("#myform").submit(sendForm);  return false; }); console.log("after form submission
  • Trouble concatenating varables to a string

    Hi all, I am having an issue with concatenating some variables to a string value.  It seemed to work fine in other instances so I'm not sure what I'm doing wrong here.  The issue is with the "prompt1" variable and the string within it.  I have these IF statements that populate the idx, idxCat and idxBrand variables which I want to then concatenate in specific spots in the prompt1 string, however it does not seem to be working and just prints +idx+, +idxCat+ etc... instead of the value.  I did an
  • IE 11 issue: d.addEventListener("DOMContentLoaded",S) with jquery 3.2.1

    Trying to use jquery 3.2.1 on ie11, i get an error on console d.addEventListener("DOMContentLoaded",S) object does not support  property or method 'addEventListener' Thanks for help
  • How to use jQuery.validate to enable submit button?

    I have seen a few site showing that the validate plugin can be used to toggle the submit button on a form I have tried a few example but cant get it working this is my code below I have it placed within the ready function just after my validate rules etc $('#form input').bind('keyup blur click', function () { // fires on every keyup & blur             if ($('#form').validate().checkForm()) {                   // checks form for validity                 $('#submit').removeClass('button_disabled').attr('disabled',
  • Object Equality in jQuery3+

    Comparing same objects from the two different array  and it return false in jQuery. I can't able to find where it is differ. To illustrate this, I have fiddle links for these Sample Why we have to use the JSON.stringify to compare the object .if an object contain array of object it return circular reference issue. so how could i compare the object in jquery without JSON.stringify.
  • Animate div contents one by one

    How to make div animation with the content one by one from "test_1.txt" and next from "test_2.txt? This what I wrote  doesn't work: Instead one by one I have animated the last file only. function MyFunction(){         var div = $('#my_div');                  div.load("test_1.txt");         div.show("slow").             animate({width: '400px', opacity: '0.4'}, "slow").             animate({height: '400px', opacity: '0.8'}, "slow").             animate({height: '10px', opacity: '0.4'}, "slow").  
  • JavaScript and/or jQuery custom events

    Hello, I am developing a Controller for an MVC style custom object and I'd like to connect some sort of event handling mechanism. It's not important what the controller is, but let's say I have a couple of events such as "happening" and "happened". Something like this: $(".happeningCtrl").happening(function(args) { /* something is about to happen */ }); $(".happeningCtrl").happened(function(args) { /* something just happened */ }); Along these lines, with them being raised something like this: $(".happeningCtrl").happening();
  • jquery window

    This code does not produce the effect it should. It just shows textwith a CLOSE button <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>jQuery UI Dialog - Default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  • How to change the background color of the tab in the active state?

    I want to change the background color of the tab in the active state from bright blue to #3C1063. How can I do this? See code below: HTML for creating tabs   <p><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /> <title>jQuery UI Tabs - Default functionality</title> </p> <p><link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" /> <link rel="stylesheet" href="https://leo.acu.edu.au/resources/demos/style.css" /></p> <p>
  • How can I use multiple toggle on one page JQuery?

    How can use multiple toggle on one page? I have two div in my HTML file and I want to hide or remove the child-1 div and then replace with another div child-2 when every time that clicking on parent title. my HTML structure as below: <div class="parent"> <h2>Title One</h2> <div class='child_1'>paragraph 1</div> <div class='child_2'>paragraph 2</div> </div> <div class="parent"> <h2>Title Two</h2> <div class='child_1'>paragraph 1</div> <div class='child_2'>paragraph 2</div> </div> and my jquery also
  • Jquery touchmove event fire when zoom mobile screen

    Hi to all, I have a web page where i used touchmove event to navigate from one page to another.Now the problem is when i am trying to zoom the mobile screen IOS or Android it fire the touchmove event and page changed. How i can prevent touchmove mean navigation through touchmove while zoom the mobile screen. Here is the code for move from one next and previour page  var currentX; var currentY; var lastX = 0; var lastY = 0; var lastT; $(document).bind('touchmove', function(e) {         // If still
  • what would be a possible solution for

    $(document).ready(function () {     $(".back-dark-1").ready(function (){         $(this).css("background-color",$(this).css("color"));     }) }); wanted to grab a css element and put it in another attribute of the DIV Anyone know how to do this?
  • How can use jQuery events?

    How can I use jQuery plugins predefined events? Most of jQuery Plugins introduce predefined events in their documentations, Is there any standard rules in general for implementing those events? For example in special case jQuery Collapsible Plugin (a jQuery plugin for collapsable boxes) or jQuery-Accordion or any other plugin defines some Events like below: jQuery Collapsible Events: Events triggered by plugin itself Since version 2.0.0, there is no possibility to pass callback functions via options.
  • onclick attribute is not working on mobile

    Hi, please I have this code <optgroup label="Service Group">       <option class="dropdown-item" onclick="testFunction()">service 1</option> </optgroup>and when I click on this option from desktop, testFunction runs perfectly, but when I click on it from my mobile browser nothing happens. function testFunction() {     jQuery('#test.recommend_link').show();     jQuery('.recommend_link').not('#test').hide(); } How could I solve this problem??
  • jquery.validate error a is null

    When I click into any of the inputs in my form i get the error a is null showing in the console log. this is my form html code <div class="Contact-Form"         <form id="myForm">             <input type="text" id="name" placeholder="Your name..."/>             <br><br>             <input type="email" id="email" placeholder="Your email address..."/>             <br><br>             <textarea rows="10" cols="20" id="form" placeholder="Your message..."></textarea>             <br><br>             <div
  • Smartmenus Responsive Submenu doesent works?

    I have integrated Smartmenus from https://www.smartmenus.org/. I have written on Developers Forum but nothing Answers. In the Chrome console I get this error. This error is only on responsive submenus. jquery.js:2 Uncaught RangeError: Maximum call stack size exceeded  at String.replace ()  at Function.fb.matchesSelector (jquery.js:2)  at Function.m.filter (jquery.js:2)  at w (jquery.js:2)  at m.fn.init.is (jquery.js:2)  at $.SmartMenus.docClick (jquery.smartmenus.js:319)  at HTMLDocument.e (jquery.js:2) 
  • Background color selection

    I have a problem with this code here: https://jsfiddle.net/09aue04a/  When I try individual highlighting, it works. but I can't make it work for highlighting "Select all" with different colors.  $(function () {   $('.selector').on('click', function(e) {     var checked = this.name;     var selectedColor = '';     if (this.checked) {       selectedColor = $('#nextColor').val();       }     $('td').filter(function() {       return this.textContent == checked;     }).css('background-color', selectedColor);
  • 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