• JQuery unable to change themes

    Hi, I have a couple of buttons that when clicked, they change between themes "a" and "b", I'm using this script to change themes: <script> $(document).ready(function() { $("#blueThemeButton").click(function() { $('[data-role=page]').page({theme:'a'}); }); $("#greenThemeButton").click(function() { $('[data-role=page]').page({theme:'b'}); }); }); </script> This works as expected when change from theme "a" to theme "b", but it doesn't work if theme "b" is applied and I want to change back to theme "a".
  • Scrollto function no longer working in Chrome

    Hello there, I'm quite new to jquery and can't fix this problem by self and it's a little bit urgent :-) Hope you guys can help me.. Since very recently we noticed that the scrollto function stopped working in Chrome (Windows; it does work in Chrome on Mac though!!) for our one-page website, i.e. the menu is not working (clicking on a menu item is not bringing you to the appropriate place on the page). Would you know how to fix this? Here's the website: http://www.greekfilmfestival.ie/ We want to
  • what data type is stored in post array

    Please bear with me as I'm a newbie, but none of my googling efforts have yielded a straight answer as to what data type is held in the post array. When data is submitted to the server via the php post array, is it submitted as a string? Again, seems like a simple google search would give me the answer to this, but I can't find anything. Also, I have searched through the topics on jquery before posting this question, as I would like to avoid creating duplicate questions. Many thanks for your time.
  • jquery not working after server migration

    hello.  I'm a skillful neophyte on everything I do. specially on Javascript. lately I thought that will give it a try, to migrate an HTML website of mine (which I did not made, since I have no idea how) to a new Godaddy server.  to my surprise it did worked! however the pics and the jquery scripts are not working (jquery.scrollsnap.js)  here's the original website located at hostgator, which is working properly. www.whywedo.fi the Godaddy's version you don't see the images scrolling, only the white
  • About getting the method's properties in treetable

    Hi: I try to enclose treetable into my library, but there comes a problem about how to  invoke each function in treetable individually.  The main code snippet is as following:  $.fn.treetable = function(method) {     if (methods[method]) {       return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));     } else if (typeof method === 'object' || !method) {       return methods.init.apply(this, arguments);     } else {       return $.error("Method " + method + " does not exist
  • colorize svg

    Hey there, for my smart home i use a piece of open source software (iobroker). There is a function to colorize svgs depending on the state (e.g. an open door). For sadness, the jquery function is obviously not correct implemented - the coloring does not work.  my goal is, that the stroke attribs of the svg (embedded through img-tag) could be replaced by an given color. Code, that is not working: setSvgColor: function (el, color) {                     setTimeout(function () {                      
  • Autocomplete a combobox

    how can I assign a default value to a combobox with autocomplete? The value I retrieve from the database and I want to pass it to the combo box to display it by default. Thank you
  • About append funciton of template

    Hi: I try to develop an template to add table automatically, and meeting an problem, my code snippet is as following: <div style="margin: 20px auto; width: 500px;">     <table id="jsonTable2" border="1" style="border-collapse: collapse;" cellpadding="5" class="table">     </table> </div>   <script type="text/x-template" class="myTemplate">             <thead>                 <tr>                     <th>Model</th>                     <th>Name</th>                     <th>Share</th>                    
  • Adding a class to input does not show it

    I have a simple problem, i have made a html part with a class named toRed, defined like .toRed {             background-color: red; } and this is the script and the html (very simple).     <script type="text/javascript">         $(document).ready(function() {             $("#btnIrRegistro").click(function() {                 $("#nombre").addClass("irARojo", 4000);             });         });     </script>     <title>JQuery Mobile Evaluacion Final</title> </head> <body>     <div data-role="page" id="pagGestion">
  • Jquery conflict with SharePoint People/Group field Address Book

    I have an aspx from a custom list app that was converted from SP2010 to SP2013/SP2016 and the pop-up box for the People/Group field address book when clicked does nothing...  If my jquery references are removed then it works???
  • Is This a Library Problem?

    Hello.  I am running a website that I am responsible from. I was using a library from http://code.jquery.com/. Because of the tests I did on my webpage, there is excessive traffic and my site does not work functionally. Is there any chance of being temporarily blocked due to traffic abuse? The link ı receive error (404) : http://code.jquery.com/jquery-1.11.1.min.js:3:5139 Thank you!
  • jQuery resizable - alsoresize rect in svg through outer div control

    HTML: <svg width="400" height="110" style="background:red"> <rect id="rectangle" width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" /> </svg> <div id="firstDiv" style="width:100px;height:100px; background:green"> </div> jQuery: jQuery('#firstDiv').resizable({ handles: 'se', animate: true, alsoResize: '#rectangle', }) With this sample, The rect inside svg always starting from x=0, y=0 when we resize firstDiv. Rect has to start from where it was its last starting/ending
  • tap and taphold background color

    Hello, I have a project that uses jQuery Mobile 1.3.2 and wonder how I can change the background-color when tapping or tapholding in general. Currently it has a grey background when I for example taphold an element. I use an Android-device with Firefox-browser. For any hint I am very grateful. Regards, Afox
  • Jquery draggable using localstorage not working after page refresh

    So I have set up Jquery draggable so a user can change the positions of divs within a parent div. When the first drop is performed, all the positions are saved to localstorage. This data is then updated each time a drop is conducted. When the page is refreshed, the div positions are all displayed correctly based on the saved positions in the localstorage. When I then click a div to begin the drag and drop procedure, the surrounding divs do not move as expected or how they did prior to the page refresh.
  • Boite de dialog modal - Traitement action sur table SQL

    Bonjour, Dans le souci de rendre mon progiciel plus interactif, je souhaitais intégrer une boite de dialogue JQuery. J'ai une table "observations_or" qui recense les observations faites par les utilisateurs. A l'ouverture de la page liée à l'article, si une observation a été faîte l'internaute prend connaissance de la dernière observation via une boite de dialogue. Il peut alors supprimer ou ne pas supprimer ce commentaire. <?php // Vérifier si des observations ont déjà été enregistrées $resultObservations
  • Creating template

    Can i create my own template using jquery/javascript to use it with web app ??
  • Scroll an element to the top on click

    I have a basic form I made that people will complete on a tablet device. When clicking the first input field, the keyboard comes into view and takes up the bottom third of the screen, hiding the further fields. If I could make the form scroll to the very top of the page, the other fields can be visible amking it obvious for the user which fields they have to fill in. So my question, how do I make the input field scroll to the very top of the page on click? <header>Some bumph in here, such as logo
  • Configurator and price calculator

    There exists a configurator and price calculator: HTML: <form id="form1" method="post" action="">     <p>         <select class="form-control" name="CPU" id="CPU">             <option value="0" selected>Select CPU</option>             <option value="246">Intel Core i5 4440 3.1GHz (3.3GHz Turbo) Quad Core</option>             <option value="268.80">Intel Core i5 4570 3.2GHz (3.6GHz Turbo) Quad Core CPU</option>             <option value="282">Intel Core i5 4570S 2.9GHz (3.6GHz Turbo) Quad Core CPU</option>
  • Jquery UI IE11 issue

    Hi,  i'm workign on a Node Js and Angular application. I'm getting an error in jQuery UI only in IE11 browser. Its rendering a blank page of my website. The website is working fine in chrome and Mozilla. Attached image of the error location. and this  is the first error in the console. I also have compatible meta tag for IE-EDGE inside the head tag.   
  • regarding Collapsible Data Grid Plugin With jQuery - Treegrid

    I am using this plugin.Its working fine. But sometimes the node which it creates does not expand. I did a debug of jquery.grid.js . And found out that _expanderClick() function is getting called multiple times in the cases when node doen't expand.  Although the html for tr and child tr are getting loaded fully. Can anyone help me with this issue. 
  • Custom ajax error message translation

    I'm using jQuery Validation Plugin v1.16.0 in zend framework 2, I want to display transalted custom message in the jQuery error. My message is converted in chinese from the Form error message but not display properly in front end. For example my message is : Please enter valid email Should be like : 请输入有效的电子邮件 But it is now as : u8bf7u8f93u5165u6709u6548u7684u7535u5b50u90aeu4ef6
  • Mini silder show error, how to fix it?

    I used code like these: <div data-role="fieldcontain">   <label for="silder2">mini silder:</label>   <input type="range" name="silder2" id="silder2" data-mini="true" data-highlight="true" value="40" min="0" max="100" /> </div> but it show not good, like this pictrue. I found it may be a jquery version problem. In jquery.mobile-1.3.2,it works well. but in jquery.mobile-1.4.5,it wors error like this picture. How to fix it? please help me.
  • Create a new table with rows of only checked checkboxes

    Hello! I have an HTML table with a checkbox in each row. I want to loop over the table and if there are any checkboxes that are checked. I need to create a new table with rows of only checked checkboxes. Any advice will be appreciated! I know how to go through the table. But how to store HTML code of that row in the variable? What I am trying to do is to send new table to a new page. function toView(){ var newWindow = window.open(); var newHTML = '<html><head></head><body><table>'; var endHtml =
  • Need help in updating the existing Jquery plugin.

    Hello All, I have implemented one jquery plugin. below is the plugin. http://www.jqueryscript.net/other/Easy-Any-Content-Pagination-Plugin-jQuery-Paginate-js.html using above plugin i have generated the dynamic list of ul using below js code. function FetchData() { $.ajax({ ...... success: function (r) { $.each(JSON.parse(data), function (key, result) { // appending data in ul. } }); SetPaginate(); } });} function SetPaginate() { $('#locationdata').paginate({
  • How to keep elements hide() show() states on page load?

    Hello, I have a CRUD in PHP where the user selects 2 options in a dropdown menu, based on the select 1 field or another shows up where the user input a number. My problem is this: If the user choose choice 2 which shows input 2 and send the information to my databasem on the next page load the php will show the choice 2 but the input will not show up until I click again on the dropdown menu... How to get jquery to load automatically based on the dropdown selection please? Here is my code: $j(document).ready(function(){
  • It is possible to trigger a keyboard shortcut or action with a click?

    The spacebar key currently scrolls any browser page down if you hit it. It is possible to bind or trigger the spacebar on a click? $("body").on("click", function(){ var e = jQuery.Event("keydown"); e.which = 32; $(this).trigger(e); });
  • drag & drop file upload question

    Hi, The following jQuery drag & drop demo is interesting. http://smoothprogramming.com/javascript/demo-file-upload-using-drag-drop/ In the meantime, it's only half of a real function, that is, we need to upload the dropped file onto the server as well. I've looked at some samples on form data passing with with $.post() function, however, I'm stumbled with two issues. (1) for regular form data, it can be handled like $('#formID').serialize(); but in this case, the form data is a file, which can be
  • a variable loads a set of values

    Hello, I want to implement this logic, but I am just starting. May be someone can help? A page www.website.com/products.php shows a few products and their prices, taken from the default price array. This website can show a different sets of prices, taken from other arrays. The set used is determined by a variable, passed in URL. A consultant sends his prospective customer a link with a variable attached, e.g. www.website.com/products.php?c=85a29. The customer clicks on the link and the page loads.
  • Animation failing to play on initial load

    Hi, I have a slider on my front page. I'm using CSS animation to trigger a slow pan in effect on the background image. The animation only starts to work on the second slide. Is there a way that I can force it to trigger on the first slide? At the moment CSS looks for the following class name, which is applied to the first slide on page load. Perhaps it's because the CSS is loading before the Javascript? Or vice versa? Here is the code I'm using and the website in question: http://www.glowdigital.net
  • jQuery not working on WordPress mobile menu

    Hi, I'm trying to use a jQuery function on the mobile menu but everything I try fails to work. I've done a test using a simple hover alert message. When in desktop mode and rolling over 'Home' the alert message displays. However, when I reduce the window down to mobile and rollover 'Home' the alert message fails to show. If I move the jQuery selector tag to say the Logo, burger menu or search icon it shows on both the desktop and mobile.  For some reason anything inside the 'mobile menu container'
  • calling auto complete source not working

    I have 2 radio button. 1) rdoWindows 2) rdoUnix i want to the autocomplete source to load only when rdoWindows checked. With this code the auto complete source loading even when rdoUnix is checked. Why is that? <script type="text/javascript">     $(document).ready(       function () {                      $('#HostName').keypress(                   function () {               var value = document.getElementById('HostName').value;               if ($('#HostName[document_type]').val() != '') {      
  • <audio> A-B repeat. Function not defined error

    I am trying to add an A-B repeat function to my audio player, but I am getting: setA is not defined error. This is the html for the buttons: <div id="repeatControl"> <button onclick="setA()" id="btnAtime">A</button> <button onclick="setB()" id="btnBtime">B</button> <button onclick="clearAb()">X</button> </div> This is the full script to control the playlist and the A-B repeat function: $(function(next) {         // Setup the player to autoplay the next track         var a = audiojs.createAll({          
  • Jquery: masonry and overlay (featherlight)

    I coded the whole masonry layout with Isotope with help of this (https://codepen.io/Goji/pen/Kpgegd ) This worked out great, and I made several categories. I wanted the images to have an overlay when you click on it, so I used this code: https://codepen.io/HVinh/pen/xwmVJb But I don't know how to select the overlay from the css in my for loops. It's probably very easy, something with .find('.overlay') but I don't know where to place it. This is the code; I've only applied it to category 0 so far.
  • Unable to delete default inputmask percentage value

    Hello Team,   I am using inputmask plugin to allow  user to enter percentage value with default % as the placeholder However when i am trying to delete default 0.00 it is not allowing me to delete. Could you please tell how to allow user to delete this 0.00 value by using backspace or delete key. Please find source Demo Code
  • truncate text in specific class

    Hi.  I'm using a WordPress plugin that returns date/time information like this, multiple times on a page:   <div class="eventsdate">    <span class="events-date-start">September 25 @ 9:30 am</span>    <span class="events-date-end">September 28 @ 4:30 pm</span> </div> But I only want the date part. how can Jquery shorten the two spans to just say September 25 and September 28?  Thanks in advance for the help.
  • jquery validate: Changing tab header's color if error exist ,(urgent solution)

    if any error has in tab ,the tab should be highlighted with some color .  thanks & Regards, Learner.
  • jQueryUI Datepicker: Show one date format to user, use another date format in the background(I have done this bit)

    I need help and can't figure this out.I can get the format date i want(2017-02-13) yy-mm-dd and use it in my codeno problem but i don't want to display this to users.I want to display dd/mm/yyyy. Not sure what i'm missing tried everything below as you can see See my code below:- $('#dateto').datepicker({             altField: "#_dateto",             altFormat: 'dd/mm/yy',             dateFormat: 'yy-mm-dd',             showOn: 'button',             buttonText: 'Select Date',             //buttonImageOnly:
  • Huge chars data is not going through ajax call to server

    huge chars data is not going through ajax call and I can able to see the chars in request body in browsers debug tools. If I send few chars I can able to receive it in server side!! ajax call : jQuery.ajax({         url : "/RegisterServlet_2/servlet/Register",         type : "POST",         data: "img="+compressed,         cache : false,         async : false,         success : function()         {         },         error : function()         {         }     }); Fyi, I don't want to send as json
  • How to create a screenshot

    I want to capture a screenshot of a graph by clicking on it from different websites,image is inside a tabbed pane.I tried using phantomjs but i am not getting how to get the element selector by clicking on website.Is there any way i can achieve it.
  • Pass List in data attribute and access using jquery

    Im currently having a User bean and a Role bean. Role{  private String roleName;  private boolean readOnly; } User{  private String name;  private int id;  private List<Role> roles; } From the controller i pass the list of users as: List<User> userList = daoFactory.listUsers(); request.setAttribute("userList ", userList); In the jsp i have set the options based on the userList <select id="approvedUserList" class="selectUser" size="5">     <c:forEach items="${userList}" var="i" varStatus="loopStatus">
  • 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