• How to show an alert (or hidden div) when selecting a particular option in a select element

    This is probably a simple question, but I'm not sure how to do it. I'd like to have an alert of some type, either standard alert or a hidden div, show up when a user selects an option in a select element. For instance, if a select element has 5 options in it and the user chooses the first one, they would get an alert that says "You have chosen the first option". I'm confident this is something that can be done with a few lines of code, but I'm not sure where to begin. Here's the logic - I'm just
  • Syntax error in jquery-3.2.1.min

    I downloaded jquery-3.2.1.min and jquery-3.2.1 After starting a simple HTML-script like this <!DOCTYPE html> <html>     <head>         <meta charset="utf-8" />         <title>R.30's jquery test</title>         <script src = "../jquery/jquery-3.2.1.min.js"></script>     </head>     <body>         <h1>Here are some tests to be done with <span style = "color: red">jquery</span> ... </h1>     </body> </html> the firefox console reported hundred times the following error found in the jquery script:      
  • Conditional hiding and showing divs

    I have two divs (div1 and div2) which I would like to be shown depending on whether a checkbox is checked and which option is selected from a dropdown box. I currently have this code but it doesn't work very well since if the checkbox is unchecked, the divs are still shown and i don't know how I would fix this: Any help would be fantastic! <script>                 $(function() {                          $('#div1').hide();                         $('#div2').hide();                         $('#boxid').change(function()
  • Oxygen eclipse JQuery Plugin

    Hi All,    Greetings.  I'm a new bie here and to JQuery. Could someone please show me a light on how to get suitable JQuery Plugin for Eclipse Version: Oxygen Release Milestone 6 (4.7.0 M6).  Before I'm here,  I searched this forum and search engine but ended with no help as I got the pages to ask to use other IDE or Not found sites. So, Help me to download a plugin from JQuery site itself. Kind Regards Mohammed SArdar
  • Hide dialog

    I need help. I create a dialog using: var newDiv = $(document.createElement('div'));  newDiv.html('content'); var d = newDiv.dialog({ id: 1, title: 'New dialog' }); When i execute d.hide() only hide content dialog and not hide titlebar. How to hide the complete dialog?
  • jquery.validate - fade out highlight/unhighlight valid classes after time period

    Hello, I am using jquery-validate 1.16.0 with query 1.12.4 and jquery-migrate 1.4.1 and am wondering if someone can please help me. Disclaimer: I am not a programmer so please go easy on me :) I have got a nice highlight/unhighlight function happening to either add/remove the error/valid classes on the grandparent div of checkboxes as well as on the text inputs. This works nicely at the moment and can be seen below:         highlight: function (element,errorClass,validClass) {             var options
  • Help with draggable widget trying to limit its function

    Hello, i´m new in this forum, so if a make a mistake please guide me, i succsesfully load the draggable widget within adobe edge animate and export it to muse, it works, but my problem is that i can make it drag only horizontal, but it has no end, i try to make like a carousel, but obviously i drag it and goes off the edge of the frame, what i need is a way so it could get back to a certain position, not the starting point, or, better if its possible, to loop the images over and over, the most close
  • Array variable inside contains()

        var good = [         "Label1",         "Label2",         "Label3"     ]; var goodlen = good.length; var i; var x = good[i];    for(i = 0; i < goodlen; i++){        $("span:contains('"+ x +"')").hide();    }         <span class='xxx'>Label1</span> <span class='xxx'>Label2</span> <span class='xxx'>Label3</span> I cant tell whats wrong here. I actually had it working and now Im not sure what happened. I  cant figure out what the correct syntax is of putting the x variable inside the jquery line.
  • How to make price and add to cart sticky ( fixed to top ) when scrolling down on mobile ?

    So Im using this  The single _variation_wrap is the class that has both the price and add to cart  $(document).scroll(function () { if ($(this).scrollTop() > 40) {  $("single_variation_wrap").addClass("sticky"); }else{ $("single_variation_wrap").addClass("sticky"); } }); and then  .sticky{ position:fixed; top:10px; right:10px; } But nothing is happening .. Please Anyone?
  • Help with Jquery

    Hi All, I want to add jquery to my sharepoint form  where I want to hide checkbox and dropdown on edit form using jquery. I am new to jquery, hence need help.
  • Why is the panel not showing?

    Hi guys Im using jQuery and I have the following problem. I have a button that shows and displays an adjacent panel, and everything works well, except in that panel i have a button to load some data, and when I click that button, the other button to show the panel doesnt show it again after hiding it. My jquery is following: var add_student_toggle = false; $("#add-student-link").click(function() {     if (add_student_toggle == true)     {                  $("#col-students").removeClass("col-lg-8");
  • Not Working Content() method of iframe

    hello guys, https://api.jquery.com/contents/ on this page there is one example of contents() method. And there given the out put also. the example is  Change the background colour of links inside of an iframe. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>contents demo</title> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <iframe src="//api.jquery.com/" width="80%" height="600" id="frameDemo"></iframe> <script> $( "#frameDemo" ).contents().find(
  • Jquery tagit not working for dynamic content.

    Hi all, I am using tagit of jqueryui. Its working if I am using like this. var desigvalues =["Actor","Anchor","Dancer","Singer"]; jQuery('#singleFieldTags').tagit({ availableTags: desigvalues, singleField: true, singleFieldNode: jQuery('#mySingleField'), allowSpaces: true, placeholderText: "Type your designation!", autocomplete: {delay: 0, minLength:1} }); Same if I am making this dynamic its not working var desigvalues; jQuery.ajax({ type: 'POST', url: "/user/edit/getdesignationlist", data: "{}",
  • Tagit autocomplete not working on mouse click.

    Hi All, Is there anyone who have worked with tagit functionality? I have few issues. 1- while using autocomplete , unable to create tag on mouse click. 2- how to add IDs that I am bringing from database. 3- how to get those ids at the time of remove tag?4- Basically want to add and delete tags value on database using PHP. 5- The most unusual issue here is why I am using select: , after mouse click on suggested list, it don't convert that into tag, I have to do an extra enter (key) press to make that
  • Radio button toggle issue

    Does anybody know how to fix the toggle failure problem if the radio button set TRUE at the very first beginning? I have to click twice to toggle the radio if the button is already checked, but my code can work perfectly if radio button unchecked at the beginning. Thanks for any help.  JSFiddle is here: JSFiddle Or you can check the code here... HTML part: <input type="radio" id="toggleMe" checked> <label for="toggleMe">Toggle Me!</label> JQuery part: $("#toggleMe").click(function(){ var radio =
  • jquery.validate using highlight/unhighlight on checkbox parent div stops text input errors

    Hello, I am using jquery-validate 1.16.0 with query 1.12.4 and jquery-migrate 1.4.1 and am wondering if someone can please help me I am not a programmer so please go easy on me :) I am hoping to use error classes for both text inputs (show message, add border and background colour change) and also for checkboxes/radios (show message, add class to grand parent divs for background colour change). I have got the grandparent change happening - if the form is submitted without ticking a checkbox, the
  • Can't get .on(change... to work regardless of where I put code

    Here we go again!! I've given up trying to run all code on one page(php). Now have tree2.html (client side),  and tree2.php (server side)  Below is the tree2.html of my program. I can't get the .on(change ..  part to work as an empty tiny, tiny table is displayed before I can enter data into the <input> block. I know this has to do with the asyn running of HTML but how do you make this work? <!DOCTYPE html>                     <html>   <head><title>tree2.html Sun 02Jul2017</title> <meta http-equiv="content-type"
  • Saved Themeroller theme shows wrong values

    I started using Themeroller to slightly tweak the base theme. From the Help I learned that I should bookmark the URL to save the theme. The problem is that after loading a bookmark, the widget demo on the right shows the correct theme, but the values on the left have their base values (or at least other values). Once you make a change and the view refreshes, it applies all the wrong values. This seems to be a problem only with recent saved URLs. So when you are in the middle of testing and modifying
  • Why ajax is sending multiple POSTs?

    Hi In the video.. why ajax sends multiple POSTs? sometimes, 2, 3, 4 or 5 times.. https://www.jassimrahma.net/temp/2017-07-05_0325.swf I have nothing in my PHP does that.. Here is the code: $("#frmContact").on("submit", function (event) {     event.preventDefault();     var formData = new FormData();     formData.append("savanna_account", Savanna.savanna_account);     formData.append("customer", customer_id);     if (e.component.option("tag"))     {         formData.append("contact_id", contact_id);
  • My Script is making jQuery not responding

    Hi, I have an script with windowssize conditions for responsive functionality in jQuery. But if I scale the window I get the error that a jQuery is not responding. I have tried to comment something out in my code to test if the script will work better but I don't have getting a positive reaction. Here is my code: https://gist.github.com/janstieler/fb88fe9dbc720e06cfeb57dd0fe4fdf3 (It was too long for paste it directly here) I would appreciate if soemone can help me! Kind regards
  • Iryna Kyryk - How to resolve Jquery Error in website?

    Hello, I am Iryna Kyryk and I am currently working on a website and getting jquery errors. Since I am new to jquery can anyone help how to remove these errors? Thanks
  • I need one help i would like to perform simple validation in jquery but here the problem is that form is getting submitted every time even after giving error message please suggest me

    //// jquery code ///// $(function(){ function checkname(){ var letters = /^[A-Za-z]+$/;  var name = $("#idname").val(); if(!letters.test(name)) { alert("only alphabets are allowed"); name.focus(); return false; } else return true; } function checkmail(){ var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;  var email = $("#idmail").val(); if(!mailformat.test(email)) {  alert("E-mail id is not valid"); email.focus(); return false; } else return true; } function checkpwd(){ var pwd = $("#idpwd").val();
  • Simple calculation data in dynamic fields

    I try create online calculator with different dynamic fields and make online calculation which will depends on changing fields. Now I've got the problem how to calculate the price for one item. example: I've got section with select, where we can choose quantity <select id="selectId">     <option>Select option</option>     <option>2 item</option>     <option>3  item</option>     <option>4 item</option> </select> Also I've got dynamic field with price where we put summary data which depends on a lot
  • How to send null in formData

    Hi, I have the following line: if (Savanna.loggedon === true) formData.append("savanna_account", Savanna.savanna_account); else formData.append("savanna_account", null); I need when the Savanna.loggedon is not true to make the savanna_account null so I can save it as null in MySQL But currently when the loggedon is not true then the savanna_account is passed as 0 (ZERO) How can I fix this please? Thanks, Jassim
  • How to update all users page automatically after delete of posts on forum page without page reload

    Kindly assist please. I'm working on a forum page with php and jquery/ajax. When i delete a post, my page is immediately updated. However, other logged-in users still see the deleted post until their pages are reloaded. What i want is a functionality that updates all logged in users pages without page reload. My fetch_posts.php file outputs the result of the sql select statement as a JSON encoded data to my jquery file. Here is some of the relevant contents of my jquery file. function fetchPosts(){
  • Implement success: function (data) in select: function (event, ui)

    I am Implementing Autocomplete and also  trying to get  a user' detail. The autocomplete works but I can not get the details. Below is my full Jquery code    Below is my full Jquery $(function () {     function split(val) {         return val.split(/;\s*/);     }     function extractLast(term) {         return split(term).pop();     }     //New event handlers     $(".user-container")         .on("userSelected", function (event) {                 var targetData = event.target.uiItem;              
  • Jquery Mobile Questions

    Hello.  3 years ago, I programmed our School Division app, using jQuery Mobile, PHP, Apache Cordova etc. I am now onto a new project for my thesis, and I was going to use jQuery mobile.  To my surprise...there seems to be lots of talk on the forums about jQuery Mobile being abandoned.  So my question is....should I start my new project with jQuery mobile...or should I move to another framework.  As well...It took me awhile to find jQuery, and it worked so well for me...is there a new recommend framework
  • Ajax Jquery Mysql Like dislike on all posts with certification count.

    Hello.  I have nice ajax php and mysql code that will insert and query a remote MySQL DB.  The client side uses no php code, and just calles to a remote MySQL DB in case I want to use the code in a mobile app as well.  What I am struggling with, is finding exmaples to modify my code, to include a like or dislike button for queried articles or records.  It would be nice if not only could I like or dislike, we could update a certified field in the table once like or yeses were over 50.  So for exmaple:
  • Simulate click on input in mobile

    I'm trying to covert over some code to work in mobile browsers, Note: have jQuery Mobile Events in the page. The html: <input type="file" id="importfile" style="display:none;"><button id="import" >&nbsp;Import</button> The orig script: $("#import").click(function() {   document.getElementById("importfile").click(); }); New script: $('#import').on('singletap', function() {   console.log('Import Button Hit'); // fires ok   console.log('Importfile: ' , $('#importfile')); // shows correct input element
  • Toggling Issues

    Hi, I would like to toggle some content. There are few of them. This is my html code: <li> <a class="courseName" href="javascript:void(0)" onclick="">Hardware System Architecture (Course Code: 111)</a> <div id="111" style="display:none;width:100%;">Desc blah blah blah</div> <br> </li> <li> <a class="courseName" href="javascript:void(0)" onclick="">Software System Architecture (Course Code: 222)</a> <div id="222" style="display:none;width:100%;">Desc Blah blah blah</div> <br> </li>  and my jquery
  • Auto slash(/) in date field

    I have a Date text field in MM/DD/YYYY. I want to populate / when user finishes typing two digit Month and Day. How do I write a Jquery to auto populate '/'. User does not want to enter a '/' after MM and DD. Any expert please help. Regards Chin
  • Pass javascript var to php using ajax on same page

    My php/html code below' After one of the <li> tags is chosen the var choice contains the text() value of that <li>. How can I/is it possible to use AJAX to pass choice to the php code   <?php set_include_path( '../../include' ); error_reporting (E_ALL ^ E_NOTICE); $str=<<<LABEL <style> .hov:hover {     color: red;     font-weight: bold;     }     li    {     list-style-type:none;     }    </style> <script src="../jquery/jquery-2.1.4.js"></script> <script type="text/javascript">      $(function(){
  • Remove the hover effect on nav bar on a single page only.

    Hi, is it possible to remove the hover effect on the nav bar for one page only? For example I have this on the footer of my first page and want to remove the hover effect on it but retain the hover effect on subsequent pages? Thanks in advance. <div data-role="footer" id="optionsFooter" data-position="fixed" data-theme="a">         <div data-role="navbar">                <ul>                    <li><a href="#" data-icon="custom">&copy; Sports International, 2016.</a></li>                 </ul>  
  • Determining Direction Of Drag

    I'm trying to determine the direction that an object is being dragged so that I can make a decision to do something based on the direction of the drag. The code below is what I have come across but it does not do what I'm looking for.   $(".draggable").draggable({     start: function(event, ui) {         startX = ui.position.left;         startY = ui.position.top;     },     stop: function(event, ui) {         stopX = ui.position.left;         stopY = ui.position.top;     } }); I would like to know
  • Can't get jquery click() to work in php file

    Hi, trying to integrate HTML in PHP file. When I focus on the text displayed in the list the css works. ie: shows in red. However the $("li.disp").click(function () { ... doesn't do anything. Any help welcomed. R <?php set_include_path( '../../include' ); error_reporting (E_ALL ^ E_NOTICE); $str=<<<LABEL <style> .hov:hover {     color: red;     font-weight: bold;     }     li    {     list-style-type:none;     }    </style> <script src="../jquery/jquery-2.1.4.js"></script> <script type="text/javascript">
  • Can't change my email address.

    I clicked on My Profile  -> edit and when I clicked on email it asked to send an email. How do I change my current BAD email address??
  • Filter a data-attribute and return the corresponding id in an array.

    Is it possible to do the following;  I want to filter through a div for to match a data-attribute. When it is correct how can I return the corresponding id in array so it can be used in the for/next loop after. https://jsfiddle.net/ysyxvtyp/416/ Thanks in advance.
  • One Page Layout Script problem

    I'm pretty new to Jquery and maybe somebody will find my mistake.So basically I'd like to get to know how do I create all in one page when i click on the anchors the page dynamically hides the main page and shows the sub page so i came up with an idea to work with display in css and toggle() method of jquery but the code works for me only for the first 2 clicks (show hide) and then it messes up there's the code of my webpage : <html lang="en-US"> <head>     <meta charset="UTF-8">     <title>Test</title>
  • Sorting items and posting extra variable to PHP

    jQuery(document).ready(function(){            jQuery('.sort').sortable({     cursor:     'move',     axis:       'y',     update: function(e, ui) {         href = ajaxpath2;         jQuery(this).sortable("refresh");         sorted = jQuery(this).sortable("serialize", 'id');                 jQuery.ajax({                 type:   'POST',                 url:    href,                 data:   sorted,                         success: function(msg) {                         //do something with the sorted
  • click or submit event is not working containt load by ajax

    // jquery code $(document).ready(function () {          $(document).on("click","#cmt-add", function (){         alert("hello");                                             e.preventDefault();                                          var frm = $('#frm');                                          $.ajax({                                                  type: 'POST',                                                  url: 'add_comment_ajax.php',                                                  data: frm.serialize(),
  • 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