• datepicker.parseDate

    Hi, I have a curious problem with datepicker.parseDate: $.datepicker.parseDate('dd/mm/yyyy', '22/04/2010');generates this error in the FireBug console: uncaught exception: Missing number at position 10 Curiously, with this format, there is no position 10 (0-based indexing) However, adding a 0 at position 10, like this: $.datepicker.parseDate('dd/mm/yyyy', '22/04/20100'); does not generate an error, but it does not parse the date correctly either: Sat Apr 22 2000 00:00:00 GMT+0200
  • How to adjust datepicker settings from inside a on('change') function?

    I have the following function:     $("#mySelect").on('change', function() {           var mySelectValue = $('#mySelect').val();           var promise = getAvailableDates(mySelectValue);           promise.done( function(data) {             var array = data;             $('#a_date').datepicker({                dateFormat: "yy-mm-dd",                beforeShowDay: function (date) {                          var string = jQuery.datepicker.formatDate('yy-mm-dd', date);                    return [array.indexOf(string)
  • Jquery tooltip plugin is detecting hover event only for 1st row in datatable

    I'm using Tooltipster Plugin to create a tooltip everytime i hover over a <td> element in a datatable. To do so, i have looped over each row in the datatable and then selected the <td> element using childnode, and applied the .tooltipster() function. However, the tooltip works only for the 1st row <td> element. Any idea how to get it working for all rows ?      $('#mytable tbody tr').each(function(){          //childNode[7] is the <td> element on which i want the tooltip          $(this.childNodes[7]).tooltipster({
  • Can I user jQuery UI in vue.js

    Can I user jQuery UI in vue.js?   var $ = require('jquery');   var Vue = require('vue');   require('jquery-ui');
  • detecting screen size when resizing browser

    Hi, I would like to prepend an element on my screen when the bowser is resized. my code works if I refresh my browser less than 500px but it doesn't work if I resize the browser please help $(window).resize(function() {  if ($(window).width() < 500) {  $(".last-col").prependTo(".celeb-quote");  }  });
  • Datepicker - mutiple instances, disable buttons or readonly help

    Hi,  I have a gridview with a date column.  Each row in this column shows it's date value with the datepicker.   This is working great except for one thing. I don't want the date displayed by the datepicker to change -  it  should only show the value of the date which is in the column, even if a button is clicked.   Oddly enough it is only the top datepicker in the first row which lets the input buttons change the date displayed.  The rest of the datepickers do not change their value when clicking
  • Add external object to an existing array through a form

    I've a table which gets updated based on JSON data. Each row in the table has a checkbox which holds the value of the corresponding JSON object, which is basically the information about any of the users. On selecting any of the rows, and saving to display the selected user profile, I'm also storing the selected JSON object in an array 'savedData'. I also have an option of adding the user externally through a form which pops up on clicking 'Open External form' button. Now, I'm trying to create an
  • h:selectManyListBox not working after upgrade jquery version 1.8.3 to 1.12.3

    Hi Team, After upgrading  jquery 1.8.3.min to 1.12.3.min version ,the <h:SelectmanyListBox> is not working properly. In selectmanylist jsf component, the selection of item is not happening for the first time and after next time it is not able to select the same item again. please have a look this issue. Br, Ankit
  • Meu slide não funciona nem a pau.

    Olá amigos. Estou estudando para depois colocar um site no ar mas estou desanimando. Fiz tudo como funciona o vídeo, mas as images estão paradas e o slide não gira. O que deve estar faltando? tem algum outro segredo? <! DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Transitório // PT" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <Html xmlns = "http://www.w3.org/1999/xhtml"> <Head> <Title> htmlCSS </ title> <Meta http-equiv = "conteúdo-tipo" content = "text / html; charset = UTF-8" />
  • Getting the last enable radio button bar the last.

    Hi, is it possible to get the last enabled radio button prior to the last item? https://jsfiddle.net/gb3f7v8k/108/ For example, I want it to ignore the fifth radio button, so instead of returning the value 5 it would return the value 2 as this is the last enabled button prior to the two that are disabled. Thanks, A4.
  • Help getting asp labels to toggle

    So basically I have an update panel and inside that updatepanel I have a checkbox(Which i have set to autopostback because I need the page to reload for something else). When I click the checkbox I would like it to toggle off and when the checkbox is uncheck I want it to toggle on. These labels are outside of the updatepanel. my code is below.. $(function () {         $(".kk").change(function () {             $(".ff").toggle(1000); }); });
  • Resized portlet will not collapse

    Hi, I have multiple collapsible/expandable portlets that can be resized. But when I resize one of them (vertically) that particular portlet is not collapsing afterwards. The other portlets are collapsing just fine. But the one that were used for resizing will not collapse properly after resize. I have a working JS FIDDLE with the issue My code: $( function() {   $( ".portlet" )       .addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )       .find( ".portlet-header" )      
  • Why doesn't the setInterval's function get invoked?

    Hi, I am trying to develop a number selector widget. It has a minus div on the left, a plus div on the right and a number div in the middle. My goal is to allow the user to press the minus (or plus) div continuously and while the element is pressed, the numeric value should change accordingly. Due to a technical problem, I cannot get my setInterval's function to be invoked. I tried to base my solution on this code sample: http://jsfiddle.net/8FmRd/ which works nicely. However, in my code (http://jsfiddle.net/Lcp52t7L/2/),
  • Validate HTML5 form on making form fields mandatory dynamically

    I've a bootstrap form which has a few fields. By default, the 1st and the 2nd fields are mandatory. Now, if the 3rd field is filled out, the 4th one becomes mandatory. Similarily, if the 4th field is filled out, the 3rd one becomes mandatory. However, if both 3rd & 4th fields are not filled out, they're not mandatory. I'm also using the HTML5 form validation here. So, here if you see, the fields Name & Date of Registration are mandatory by default. However, I'm trying to make Website mandatory when
  • help : "Uncaught TypeError: $(...).swipe is not a function"

    <!-- below is my script for side bar --> <script type="text/javascript">       $(document).ready(function() {   $("[data-toggle]").click(function() {     var toggle_el = $(this).data("toggle");     $(toggle_el).toggleClass("open-sidebar");   }); }); /* mistake in swipe area */  $(".swipe-area").swipe({     swipeStatus:function(event, phase, direction, distance, duration, fingers)         {             if (phase=="move" && direction =="right") {                  $(".container").addClass("open-sidebar");
  • Volume Control Handle

    Hi all, HTML                        <input id="volume" type="range" min="0" max="10" value="5"> Using jQuery for play audio, pause audio, stop audio, next song, prev song and volume control. Unable to reset volume control handle back to default value (center) after selecting next song from the playlist. Have not supplied the jquery code in case it took up too much space. Happy to supply it.  Any assistance is much appreciated. Regards Tony                  
  • Unclear mousedown event behavior

    Hi, I'm new to jQuery, so I apologise if this sounds silly. I'm referring to the the mousedown API documentation: https://api.jquery.com/mousedown/ Using the example at the bottom of the page, I was expecting the mousedown event to get fired as soon as the mouse is pressed. Instead, when using my finger on my chrome mobile browser, both mousedown AND mouseup events get fired together when I lift the finger off the element. Why is that? Thanks in advance, Nir
  • Reposition draggable element to initial position

    I have 2 issues which are as follows: I have prepared js fiddle for my issue: I'm having left and top position assigned to each draggable item. Now, when draggable item is dropped outside of droppable area then draggable item doesn't position itself to initial position. As per my reading, I have also tried to set top and left to 0 but it didn't work. After dropping element in droppable area, what changes are required so that draggable item covers entire droppable area? Can anyone help me with this
  • JQuery UI inline DatePicker loses selected date after ASP.NET postback, How to keep it?

    Hello to All I have a  jquiry datepicker and the code is as below: <div id="test"></div> <asp:TextBox ID="txtRDate" runat="server" Width="120px" ClientIDMode="Static"  AutoPostBack="True" OnTextChanged="txtRDate_Te xtChanged"> </asp:TextBox> Javascript code is: <script type="text/javascript"> $('#test').datepicker({     dateFormat: 'yy/mm/dd',     minDate: new Date(2017, 1, 1),     defaultDate: new Date(), onSelect: function(date, obj){     $('#txtRDate').val(date);  //Updates value of date  $('#txtRDate').trigger('ch
  • Save the dynamically created DOM and create a JSON

    I need help for creating the JSON of the dynamicallly created dom objects which has exactly the same format, which was while receiving the JSON to create the dynamic element. To simplify thing, I've create a dummy application, which is available in the JSFiddle link provided below. Now, if you see, in the table I'm getting the data through JSON. The checkbox values in the table are JSON objects.  When I select any of the checkboxes and click on Save, the corresponding div is generated and displayed.
  • MP3-jPlayer: skip to minutes by clinking the timeline

    On this page I have the MP3-jPlayer WordPress plugin with the Text Skin, slightly modified. I have deleted the volume bar from the plugin’s html/php structure. I have also added a “seekbar”: <div class="seekbar-wrapper"> <div class="seekbar-container"> <div class="seekbar" value="0" max="1"></div> </div> </div> I have modified the plugin’s mp3-jplayer-2.7.js file in order to show, for every track (mp3 files), the timeline. After line 403 (jQuery(this.eID.indiM + j).empty().append('<span class="Smp3-tint
  • Calculate Total

    Hi   I have below code and i want when user changes Quantity row total & grand Total should also change. Quantity should not be -ve <div class="container">     <div class="row">         <div class="col-sm-12 col-md-10 col-md-offset-1">             <table class="table table-hover">                 <thead>                     <tr>                         <th>Product</th>                         <th>Quantity</th>                         <th class="text-center">Price</th>                         <th
  • JQM - multi page, changing pages is auto selecting a text input

    I have a very basic jQuery Mobile site in early stages, built off the multi-page template from the jQuery mobile documentation. My first page is a basic login form, with a registration link going to a second page. When I navigate to that second page, my <input type="password" placeholder="password" > is being autofocussed on page load. I have absolutely no idea what I'm doing wrong. Any assistance or advice would be greatly appreciated! Thanks :-)
  • Does an object "derive" attributes and behaviours from a Class ? : An exam question doubtful

    Plz help me . It was a board exam and I wrote " objects are instances of classes and derive properties attributes from a class" Need experts reviewal whether that statement was right or wrong.
  • Datepicker altFormat issue

    The documentation seems to indicate, altFormat:"MM dd, yy" would return April 07, 2017 for today, but it actually returns "04/07/2017", what's going on?  Did I misread its doc? Thanks.
  • How to add some static data to Datepicker date?

    For a jQuery UI's datepicker field and I'd like to add a static timestamp to a selected date value upon date selection.  I've looked at all the attributes for datepicker, however, none seems appropriate for this need. And I attempted to trigger onblur and onMouseout respectively to call up a function to append the static timestamp, however, it quickly shows up and then disappear.  So, what to do this?  And I wonder if there's a special event, which essentially kicks off after all other events are
  • JSON to Table

    Hi, I want to ask how can I populate this json into HTML <Table> with two columns Currency and Rate when populating through ajax success? http://www.apilayer.net/api/live?access_key=6942e4bd7fcd69b95d0ed7f77951697c&format=1 Thanks, Jassim
  • Help from a datepicker master please! Trouble setting the date correctly.

    Hi there, could really use some pointers from an experienced datepicker user. I have a gridview in an ASP.net webform.  One column of the grid is composed of both an <asp:label/> and an <input type="hidden"/> control. I have managed to get a datepicker to appear in every row of this column and for the date of each datepicker to be set by the value of the <input type:hidden> control (a list of dates). The label shows the same data as text. When I click on an icon in the row the datepicker appears
  • Webpage's Scroll should be visible When Overlay is Active

    Goal: When you open the overlay, the webpage's scroll (not overlay's scroll) should be visible but not active to use. Problem: It is irritated to see that the page moves to the right side when you invisible the scroll and when you visible the scroll the page moves to the right side in relation to overlay. Is there a way to do it? Thanks! http://jsbin.com/lacajijuce/edit?html,css,js,output
  • Datepicker same width as the input in a bootstrap grid layout

    I have an input field that has a bootstrap class of "col-xs-6". This input has a datepicker associated and I need it to be the same size. I used the beforeShow event to calculate the width of the input and place it on the datepicker. However this works only if the user does not change the month. Can this be achived? I saw that you can change the size using css but as you know the grid layout is dynamic so I can not use the css change since it will make the datepicker with fixed size.
  • running function based on elements id

    Hi, I am trying to put together a small function to change the class of a form's input field. I know that I can do this for a specific if but I would like the function to run for multiple fields using the appropriate id. My Javascript experience is limited and so is my jQuery. I am already using jQuery on the page for a dropdown/hamburger menu so would like to use jQuery for this. I would also want to use onChange rather than something like onKeyUp to trigger it as someone might paste with a mouse
  • Facing Issue on Loading JSON to Bootstrap Tab

    Can you please take a look at this demo and let me know why I am not able to load the second layers of data in the JSON to bootstrap tab `tab-content`? var data = {   "action": [{       "id": "1001",       "name": "Matrix"     },     {       "id": "1002",       "name": "IP Man"     },     {       "id": "1003",       "name": "Revenge"     }   ],   "comedy": [{       "id": "2001",       "name": "Iceman"     },     {       "id": "2002",       "name": "Pat & Mat"     },     {       "id": "2003",    
  • function that returns a element on passing X Y [on hold]

    Is there any function that returns a element on passing X Y, if there the location is over a element. We can not use mouse over. Thanks in advance
  • Autocomplete Caching and using _renderMenu correctly

    I am trying to make the following autocomplete code work but cannot identify the errors in the code.  A very basic autocomplete works but I’d like to add caching and the ability to change the list that pops up, but I could not do so following the jquery instructions.   Here is the code first: <style>         .odd {         background: blue !important;         font-size: large;     } </style> And here is my jquery, at the bottom of the page: <script> $(document).ready(function() {         $.ajaxSetup({type:
  • Create and append dynamic div if the div with same value doesn't exists

     I'm working on some application wherin the data will be displayed based on some selection. The data will be selected from the table as shown in the screenshot. It gets populated in the table through some JSON. Now, lets say, for example, Select A & C from the table shown in the screenshot and click on 'Save'. A & C get appended to "div.box" with ids "parent-0" and "parent-1" respectively. Now, select A & B from the table. Current situation: Nothing is added, and alert is shown as "Data already exists!"
  • Two errors: scroll is not a function & Cannot read property 'top'

    Hi everybody! I am trying to solve some errors of an online printing company website and I´m stuck in a couple of them. I do not find solution. Both are jQuery errors that can be seen by going to https://www.imprentaonline24.es and you pressing examine and you going to the console tab. Error 1: Uncaught TypeError: $(...).scroll is not a function at www.imprentaonline24.es/:216 Error 2: Uncaught TypeError: Cannot read property 'top' of undefined at HTMLDocument.<anonymous> (www.imprentaonline24.es/:184)
  • HTML5 form validation in a bootstrap modal

    I'm relatively new to jquery and javascript.  The form opens up on clicking the button "Open Modal" in the modal. Next, when I click on 'Save' in the modal, it should validate the HTML5 form and on successful validation should call another function "addDetails()". How do I achieve this using existing jquery form validation plugin or any other method? What CDNs I need to refer to while using?     <!doctype html>     <html>      <head>      <meta charset="utf-8">      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  • Get all href attributes of dynamic links inside dynamic div stored in array

    I've a few dynamic elements being generated on click of a button.  On click of this button, I get dynamic divs generated which also contain link. I get only the first href attribute value("link0.com") in the array "linkArr". How do I get all of the href attributes stored inside this array? Here's my code. <!DOCTYPE html>     <html>                  <head>             <meta charset="UTF-8">             <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  • Create a dynamic div and display if it doesn't exists already in the display list

    I'm working on an application wherein the data will be displayed here based on some selection. Please note that, the data in the table actually comes in through some JSON. However, here I've hard coded all the data here in the table. Unfortunately, I don't have the JSON to share.     <!doctype html>          <html>      <head>      <style>      table, th, td {      border: 1px solid #ddd;      border-collapse: collapse;      padding: 10px;      }           .parent {                     height: 25%;
  • Set value of the textbox equal to the first activated date in datepicker

    Help please, my code is working, and it is activating only the day of week that i want, but by default the textbox has no value, i want the value of the textbox to be equal to the first date activated in my datepicker, My code is: <input type=text name='dtpick' id='datepicker'> <script> var j = 3; $(function() { $('#datepicker').datepicker({ minDate: 0, beforeShowDay: function(date) { var weekDay = parseInt(j, 10); if (weekDay === date.getDay()) { return [true, '', '']; } return [false, '', ''];
  • 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