• [Concept development] Quiz Start Button, without revealing anything!

    I need help with the concept development so that I've some 'starting point' before I can think about the code. Here's what I want to do: I'm developing a quiz software using PHP and I want all the users to land one a 'Quiz Start' page. This page would show a countdown timer and once the specified unix time is achieved, it should convert the timer into a button that takes the user to desired page. Problem: The 'smart' users can view the jQuery and therefore can quickly know which URL I'm going to
  • Global variable in different scripts not working

    Hi Need your help!!! I am new to this and seeking help. I am trying to pull data in an html using xml. For this i have few script used (taken from other sites) 1st script will fetch the data from xml and store in a global variable and the same variable is used in the second script. However when i am trying alert global variable in first script showing the value but alert in the second variable is retriving blank. Please help me. the html code is given below  <!DOCTYPE html> <html>   <head>   <meta
  • Superfish Not Displaying As A Block - Drupal 8.0.0

    1-Jun-17 Good Afternoon, I installed Superfish as well as the Superfish library. I enabled Superfish and received the following confirmation: Module Superfish has been enabled.  Unfortunately, when I go the Block layout page, I do not see the Superfish block. I have cleared all the cache from the admin screen numerous times and I've done a hard refresh on the Block layout page, but still a no-go. Drupal: 8.0.0 Superfish: 8.x-1.0 Superfish Library: 2.x Thanks in advance for your time and consideration.
  • Search omdb api and if no matches are found search local js object

    Is it possible to search for a movie with the omdb api and is no results are found search a local javascript object? Here's a jsFiddle of what I have tried so far. I am just learning the basics of jquery and I think this one is beyond me. It does require an api key that I have if required for testing, but the omdb part is working fine. I just can't get the local javascript bit to work
  • JQUERY-1.8.2.js compatibility with Safari 10.1

    Hi All Could you please let me know whether JQUERY-1.8.2.js is compatible with the Safari 10.1 browser on Mac OS Sierra. Appreciate you help. Thanks, Achen
  • Intermittent problems

    Hi all, I'm new to jQuery and also pretty green with JS, but not bad at PHP etc. I have a site which unfortunately isn't exposed on the net so I can't directly link you to it. I'll try to explain the problem though. My page uses the following routine to load a separate PHP page into a DIV: function display_table() {     var ajaxurl = "./includes/modules/sec0020/sec0020table.php?page="+page+"&loc="+loc+"&scol="+scol+"&fcol="+fcol+"&filter="+filter;     $.ajax({         url: ajaxurl     }).done(function(data)
  • why i can't include library with Ionic-Angular App

    Hello,  I'm developping an app with ionic - Angular and I wanted to make the dragging service with jquery UI but it didn't work enven with basic examples, this is my code:  <head>   <script src="https://code.jquery.com/jquery-1.12.4.js"></script>   <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script>   <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>   <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.4/jspdf.debug.js"></script>  
  • Add Add-ons data to Payment Summary

    I have add-ons list with plus, minus icon for increment and decrements count. When user click on + icon name and price with count should added to payment summary. I have used foreach but its not working. $('.js-plus-icon').on('click',function(){       //code } $('.js-plus-minus').on('click',function(){       //code } //html <div class="input-group" style="margin-bottom: 5px;">       <span class="input-group-btn">            <button type="button" class="btn btn-torq js-minus-icon 1" data-minus-addon="1"
  • Getting events from newly created child windows

    This is not a strictly jQuery question, though it would be nice to achieve the result in jQuery. Suppose you create a window with the jQuery (or JavaScript) in your webpage.  You can name the window, and you can get a handle to it.  I want the same events and functions to apply to the child window (or new window) that apply to the outer window.   So, for instance, if I have a mouseup event in the main window that brings up a window that says "Hello World", I want it to work in the newly created window
  • jquery dropdown navigation link

    I've been trying to use jquery as my dropdown all to no avail. The code below runs like a static href code that goes nowhere whereas the link in the anchor tag is valid. How can i get it to work? Here's the Jquery code:       function DropDown(el) { this.dd = el; this.placeholder = this.dd.children('span'); this.opts = this.dd.find('ul.dropdown > li'); this.val = ''; this.index = -1; this.initEvents(); } DropDown.prototype = { initEvents : function() {       var obj = this;       obj.dd.on('click',
  • Re-enable disabled radio buttons

    I have a 3 rows of radio buttons with the last two items disabled.  Is it possible when a button is pressed to uncheck any checked items but to maintain the state of the two disabled buttons? https://jsfiddle.net/gb3f7v8k/115/ For example on rows 1,2,3 they would all become unchecked bar the 1st and 2nd button in each row. Thanks.
  • Calling multiple functions with code within fails to call both, only calls the first one

    Hi, I need help please. trying to call multiple functions but it fails. it only calls the first one, not the second, I mean it has to call both of them. I use native Javascript then JQuery but still failling. When I take out the code and just leave the alert("") message, it successfully calls multiple functions. The problem is my functions have to contain codes, not only simple alert statement. Please see code in attached TXT file.
  • Theme Roller Button Changes Size on Hover

    I am working on a website that is using oscommerce 2.3.4 and a Theme Roller theme running jquery-ui-1.10.4. One minor issue is that the bold button text changes to normal on hover and the button shrinks. Rather than re-run the theme in Theme Roller again, I thought I would hack the jquery file to provide bold text on hover. I have been unsuccessful. Any suggestion you may have would be appreciated.
  • jquery and jquery.plugins.r2.js

    Hello. I will start by saying that this is outside of my knowledge base but I am troubleshooting. I have a client site that all of the sudden stopped working. It seemed to loose all of its styling but the reference for that is unchanged as are the pages. So I looked at the error console and discovered that the jquery is outdated and throwing errors. The CMS is outdated as well but we don't have the passcode to update it. It also references the plugin below: jquery.plugins.r2.js I am unable to find
  • A better alternative to window.scrollTop?

    I am relatively new to jQuery but I've been able to use it to create a header that changes when the user scrolls. I've been using the following code to make it work:  jQuery(document).ready(function($) { $(window).scroll(function() { if ($(this).scrollTop() > 0) { if ($(window).scrollTop() > 20) { $('.move-logo').css({"transition-duration":".4s","height":"60px", "width":"90px","left":"44.7vw"}, 800); $('.site-header').css({"transition-duration":".4s","border-bottom":"solid","border-color":"#4494cd"}).removeClass("site-header-clear").addClass("site-header-white");
  • My script is returning a full string instead of values.

    I have a project I am working on for my own use. I need just the values returned with each in it's own div and to clear the divs if no results are found. I am learning jquery, but I'm having a bit of a struggle working it out. I have setup a jsFiddle if someone has the time to have a quick look at it for me. This is the reponse I get: [{ "title": "Rocky", "rating": "PG", "year": 1982, "plot": "Movie plot goes here Rocky rulez", "poster": "<a href=\"/image name.jpg\">" }]I would like to have a div
  • How to hide / show a button in jQuery

    I have a form and three buttons on the bottom, lets say A, B, and C. When I click on A it needs to disappear and the B and C need to be the only ones that are shown. After clicking on either B or C, the button A needs to reappear again. jQuery is what I need to use.
  • Maintain active tab through multiple page loads

    I have a list of links: <ul class="links">     <li><a href="link-1.html">Page 1</a></li>     <li><a href="link-2.html">Page 2</a></li>     <li><a href="link-3.html">Page 3</a></li> </ul> And below that some jQuery tabs: <div id="tabs">     <ul>         <li><a href="#tabs-1">First</a></li>         <li><a href="#tabs-2">Second</a></li>         <li><a href="#tabs-3">Third</a></li>     </ul>     <div id="tabs-1">First tab content</div>     <div id="tabs-2">Second tab content</div>     <div id="tabs-3">Third
  • Form Navigation via Dynamic Colour Changes to Dropdown Text

    Can anyone assist ? I have a multistep form comprising various dynamic DD selects that a user is guided thru using purple buttons that light up to prompt user navigation & selections in the correct order. Step1 snippet of the overall form is shown here: [URL="http://www.jcsweb.biz/mef/client/wd_scen_lev/Step1_01j.php"]http://www.jcsweb.biz/mef/client/wd_scen_lev/Step1_01j.php[/URL] To optimise the layout, I wish to remove the buttons that light up but maintain the colour-guided navigation using dropdown
  • callback functions arguments

    callback functions can ether be a reference to a normal function or a anonymous function ie $( "#dataTable tbody tr" ).on( "click", function() { console.log( $( this ).text() ); }); or function notify( event ) { alert( "clicked" ); } $( "button" ).on( "click",{name:bob}, notify ); my question is if there data is provided via an event object is there any way to pass the event object to the function if a autonomous function is used?
  • What is "contextmenu"?

    I saw an example on jquery-practical-exercise The entire code <!DOCTYPE html> <html> <head>     <meta charset="utf-8" />     <title></title>     <script src="Scripts/jquery-2.1.0.min.js"></script> </head> <body>     <script type="text/javascript">         $(document).ready(function () {             $(document).bind("contextmenu", function (e) {                 return false;             });              </script> </body> </html> My question is what is "contextmenu" here? By the bind Inside the parentheses,
  • Save json data to database

    I have loaded a file with json data into a jquery datatable. I was wondering how I can save this data to a sql server database table. Thanks !
  • Simple way to disable jQuery on web page containing many edits?

    Is there a simple way to turn jQuery on or off on a page containing many edits? The reason I ask is that I have three pages that use jQuery and validate() on forms where users are given input. The various edits on the second and third form work just fine but none of the edits on the first form seem to be working. It's not that their are coding bugs making some of the edits work incorrectly: NONE of the edits seem to take place. It's hard to remember details from several years back but I think I might
  • How to save updated text file?

    In this post I got response to my question on how to read the text file (using jQuery) and show the information on the page. Reading text file: $.get('Files/Address.txt', function(textData,) { aLines = textData.split("\n");       $.each(aLines, function(n, sLine) {          // your code comes here       }); }, 'text'); Now the natural following of my previous post: How to update and save the text file with edited contents? Tom
  • Error with ajax

    Hi. I have a form with some fields ad the field for upload an image. Inside this form there is a table with some rows.  My target is send all form informations to php.  This is my code: $(document).ready(function(){     var array_orari =[]; $("#salva").click(function(){          $('#orari tbody tr').each(function () {                     var giorno =  $(this).find(".giorno").html();           var apertura1 = $(this).find(".ap1").val();           var chiusura1 = $(this).find(".ch1").val();        
  • How to read the text file and show the information on the page?

    Hi guys! Please, be gentle to me! I’m just trying to get into jQuery… My first try is to read a text file and put information read on the page. I found, modified a little and used this code:    <script>  $.get('Files/Address.txt', function(textData, status) {     var aLines = textData.split("\n")     alert(textData + '\nStatus = ' + status);   // this works, all lines                                              from the file are displayed     $.each(aLines, function(n, sLine) {        $('#textFromFile').append('<div>'
  • How to access 2nd level of dynamic JQuery & Ajax menu?

    I have a menu which works perfect for 1st and 2nd level only, but I need to go deeper and show all sub levels. The menu is something like this when it loads:
  • How do I require one checkbox out of a group of related ones to be chosen?

    I have a form which has five related checkboxes. My user can choose one or more of the five checkboxes but I need to ensure that he selects *at least* one. I don't care which one(s) he checks as long as he checks at least one of the five. How do I do that in jQuery? I realize I'm going to have to test if any of the checkboxes have been checked but I can't figure out which field to associate the edit with since no specific checkbox has to be selected. Do I associate it with the Submit button instead?
  • Release levels of jQuery?

    I have some jQuery code that I wrote 4 or 5 years back. They files include these lines, which I think were the current release levels at the time I wrote the code: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.js"></script> I'm back updating the code now. Should I be updating the versions of the code to the now-current version or is it fine to leave the levels are they are? Is there
  • Selecting the elements in an html array

    Hi,  I want to select the elements in an html array in order and give them an id. I tried for a long time but I could not.  For example, I want to give an id to all the elements in ".dropdown".
  • Debugging Ajax Jquery

    Using the code below, is there a way I can see the json being returned using a debugger? $(document).ready(function () {            $('#example').DataTable({                "ajax": '../data/arrays.json'            });        });
  • 2 Versions; Same Page (Omit Older; use Newer Version?)

    I have seen a lot of posts here, and elsewhere, that discusses the use of multiple jQuery versions. I have read about using the noConflict option: var jq132 = jQuery.noConflict(); I have also read in several places that it is best to avoid this option and stick to 1 Version per page. If I were to go w/the latter option; can I simply stick with the newest version of jQuery and be OK w/the functionality of the page? I expanding on a preexisting web site. The site is in WordPress (if that even matters),
  • About javascript function closure

    Dear all: I try to improve the ability of javascript, and meet a problem about closure, like following example:  function Y(f) {   return ((function(x) { return f(function(v) {   return x(x)(v); });   })(function(x) { return f(function(v) {   return x(x)(v); });   })); } var factorial = Y(function(fac) {   return function(n) { return (n == 0 ? 1 : n * fac(n - 1));   } }); console.log( factorial(5)); I don't know how the function Y(f) works. I have add console.log to see the detail , but still confuse
  • Chrome error report - Uncaught TypeError: a.indexOf is not a function

    Hi i show this error at chrome - error report jquery-3.2.1.min.js:4 Uncaught TypeError: a.indexOf is not a function at r.fn.init.r.fn.load (jquery-3.2.1.min.js:4) at mainlayout.js:3 - Source <!DOCTYPE html> <html>     <head>         <meta charset="utf-8" />         <title> Default </title>         <script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>         <script type="text/javascript">         // error point         $(window).load(             function() {                 //>
  • remove element but leave inner content?

    Assume I have a html structure like <div class="aaa"> .... <a href="http://.......>linktext</a> ... <a href="http://.......>other linktext</a> ... </div> Now I want ot remove (only inside the div[aaa] element) all wrapping <a> elements which contain a href= attribute but leave the inner content of the <a> elements´. When I code something like $("div.aaa).$("a[href]").unwrap(); then the wrapping div.aaa is removed and not the <a> s How can I achieve this (otherwise)? Peter
  • Finding title in content using contains()

    Is it possible to do: if first word in #title appears anywhere in #content than change color of #title to green? I tried an if statement but Im not sure whats going on there. Also im trying it with one line of jquery but Im getting lost in the stacking of methods/selectors. I doubt I can do it with just one line of jquery.  <p id='title'>  paragraph  </p> <p id='content'> this is a paragraph </p> $("#content * :contains(#title.text())").css('color','green');       //---OR---       //(below I'm only
  • Why I can't read json output?

    Hi, I have this json output in my console: new_user.js:310 { "UserDetails" :[{"first_name":"ةةة","last_name":"ضضضض","email_address":"jrahma@gmail.com","user_guid":"265aec7f-40cb-11e7-83e2-0cc47a4422ed","activation_guid":"265aec9f-40cb-11e7-83e2-0cc47a4422ed","activation_check_guid":"265aeca3-40cb-11e7-83e2-0cc47a4422ed","user_language":"EN"}]} I am trying to read it using  console.log(data.UserDetails[0].first_name); but getting: Error: 'Uncaught TypeError: Cannot read property '0' of undefined',
  • Styling of close icon on dialog

    I am using the dialog widget with a custom theme. In several of my dialogs I don't need any buttons. However, if I don't include any buttons, the styling of the close icon changes (the background is one of the theme colors, instead of white). Why would the presence/absence of buttons affect this? Icon when buttons are included Icon without buttons
  • Disapointed with new Button icons option

    Been really busy and was just tasked with looking into upgrading to the latest jquery ui, however I am very disappointed with the button icons as functionality has been removed. We have developed a few web apps, and many of them have buttons with an icon on the left and a drop down icon on the right.  With 1.12 it seems that a button can now only have 1 icon, thus removing functionality. Why not leave the icons option, instead it should consist of objects of icon objects ( {icon:"ui-icon-plus", "icon-position":"top"}
  • My script is working in firefox and not working in chrome

    Hi, I have this script working in firefox, but it's not working in chrome, I added this script before </body> directly, what should i do???? <script>     // Select City        $(document).ready(function () {                $('option[value="alexandria"]').click(function () {             $("#city_service").html('<a class="dropdown-item text_right" href="#" onclick="myService_alex1()">خدمة (1)</a><a class="dropdown-item text_right" href="#" onclick="myService_alex2()">خدمة (2)</a><a class="dropdown-item
  • 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