my superfish menu seems to be missing css formatting
I upgraded my site to the latest jquery but then superfish menu stopped working. So as superfish was also very old (v1.4.1) I have upgraded it to 1.7.10. Now the menu functions but it seems no CSS is being applied to it as the menu is not horizontal but expands vertically If you compare the previous working site at: http://ancestry.higgsy.co.uk/ with the failing site at: http://v38.ancestry.higgsy.co.uk/ you will quickly see the problem. if any of you fine experts can suggest what I'm doing wrong
GZIP Iisue with code.jquery.com CDN ?
Hello, Starting Wednesday, when doing an availability test of our site, there have been issues with the CDN. The file that's being loaded is https://code.jquery.com/jquery-3.1.0.min.js The file downloads and browsers are still able to load it, but we get this error: System.IO.InvalidDataException: The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.
Wait cursor is not changing until mouse moves
Hi, I have simple code to display the busy cursor while I am waiting for the ajax call to be finished (callback done) and when the call is finished I restore the cursor to the default value (method always). I have noticed that if I don’t move the mouse the icon for the mouse does not change. The same happens the other way around – when the call is finished the cursor default icon is not restored until I move the mouse. Is there something wrong I am doing or this is genuine bug in Chrome (I am using
Targeting span w/ special characters & appended input classes inside
I have some forms and inputs that are appended to a span. I'm trying to target the span's id and it has special characters in it '~~' & then get all the appended inputs inside of it (var fileupload). Not sure if it's the characters or the appending causing the problem. How can I target the inputs? Here's a jsfiddle: https://jsfiddle.net/billparti/ex71hmoq/
Slidebars.js still relevant?
We've been using slidebars.js on all our projects, since it's part of the template that was built by a developer four years ago. Is it still relevant? Slidebars 0.7.1 - http://plugins.adchsm.me/slidebars/
jquery multiselect with ok and cancel button
I am using jquery multiselect in that i want to use ok and cancel button so when user can select ok option should be selected. jquery.multiselect.js example https://www.jquery-az.com/jquery/demo.php?ex=48.0_7
Jquery UI callback
I am simply trying to do a callback after my accordion has been created AND initialized.I have two tabs that get created. In each tab is an accordion that gets created. However my work can only be done on the accordions once the tabs and accordions are done initializing. I am getting a race condition where I am trying to change elements that are not initialized yet. Below I tried to add the "change" event to teh accordion, as I saw this elsewhere on the forum. But its not doing anything. So I assume
How to get multiple select box value using jquery,
Hi, How to get multiple select box value using jquery,I tried below code but i get normal dropdown not multiple selected dropdown. <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" href="http://www.erichynds.com/examples/jquery-ui-multiselect-widget/jquery.multiselect.css+demos,_assets,_style.css+demos,_assets,_prettify.css.pagespeed.cc.8klr74YZ6Y.css"> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css"/>
Populate <div> from a remote source on button click.
Hi, how do I populate a <div> from a remote JSON file. The file will be on a remote server but I want to Here is a fiddle: https://jsfiddle.net/lammie71/sr02zcky/10/ When the load data button is pressed I want the "JSON_data" div to be appended by listing all the long_name from the remote file: http://paullamacraft.com/abc.json Any help or advice would be great thanks.
Prevent event overlap in custom jQuery image carousel
I am working on a custom image carousel, using jQuery and CSS. My aim is to make it really lightweight but with (just) enough features: "bullets", auto-advance, responsiveness. The slider had a bug (described in detail HERE): when I clicked 2 bullets in rapid succession, the transition would overlap, instead of "standing in line". The fix I found is making all the bullets except the active one non-responsive to clicks, instead of queueing the clicks : var $elm = $('.slider'), $slidesContainer
Bootstrapvalidation and returned value
Hello For one of my HTML form, I have one field called password, first I want tot check if it is null or not, and then it would check in background using remote call using URL to know if that is valid or not. and from backend process it would return wheter does it exist or not and other field value to update the iframe content/src dynamically. I know using remote I could go to backend and check for validations however, I am not sure on I can assign value to existing field if it is succeed and returns
jQuery gets confused if used from a fragment loaded by jQuery itself
I have a problem with jQuery in a page which contains few divisions. Let us consider the following HTML code: <div id="a"><a href="javascript:/" onclick="LoadB();return false;">Load B</a></div> <div id="b"></div> <div id="c">TEST</div> where function LoadB( ) { $( "#b" ).load( 'b.html' ) ; } and b.html contains <a href="javascript:/" onclick="LoadC();return false;">Load C</a> where function LoadC( ) { $( "#c" ).load( 'c.html' ) ; } and c.html contains <p>Hello, world!</p> If I click on "Load B"
Dynamic listview no display
Hi I have put up this page with external json data to display. i have no idea y it does display json. but on the console there was no errors. please tell me where am i wrong. -------------------html-------------- <!DOCTYPE html> <html lang="En"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>----SRM----</title> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> <link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
Pasting data, which option is faster / better?
Still working within a contenteditable, and I'm manipulating data that's being pasted in. It seems like I have two ways of doing this, and I would like your advice on which way is going to be faster or overall better... or if you have any other suggestions to make it faster or better. Option 1, lists "beforepaste" and "paste" separately: $('#comment') // this works for IE9, and probably earlier .on('beforepaste', function(e) { if (window.clipboardData) {
Show file preview of input
I'm trying to show a simple preview of a file, once it is selected in a form input. The image that I am trying to write a source to is appended after the page is loaded but before the image is displayed. <form> <div> <div> <input type="file"> </div> ... <img class="preview" src="#" alt="Preview Image" /> </div> </form> function myFiles(files) { // files is the selected file console.log('File: ' , files[0]); // has name, type, size, etc.
$.ajax data and sucess
I have recently gotten with the times and upped to the latest jQuery (yea me). I also have lost touch with my programmer (my bad). Can someone help with updating this code to work with my new jQuery v3.3.1. Much appreciated.. <script> $(function() { $(".pollradiovote").live("click", function() { var pid = $(this).attr('pid'); var vid = $(this).attr('value'); $.ajax({ url: '/includes/polls.cfc?method=vote', data: "pid=" + pid + "&vid=" + vid, success: function(data)
How to trigger a change on button click
I want to update a dropdownlist when another button is click by calling trigger but getting an error. Below is my code any help will be appreciated $("#btnReplace").click(function () { const oldPersonId = $('#OldbuttonId').val(); const newPersonId = $('#newPersonID').val(); var button = this; $.ajax({ method: "POST", url: "@Url.Action("Replaced", "NewReplacement")", data: { OldId: oldPersonId, NewId: newPersonId}, success: function (response) { $('#cdrl-load-text', button).html('Saved!'); if
Help getting a jQuery Example to work
Hello, I am a complete noob with jQuery and web development in general. I am trying to get some of the example widgets (in this case a slider bar) given on the jQuery site to work using the provided source code but they fail for seemingly no reason. I can copy and paste the source code listed under the widget into an HTML file and when I open it I will see a blank page. Why does this happen?
Search page function
Hello. I manage an intranet site, that contains a very large amount of data (mostly hyperlinks). I would like to add a search box that indexes all content on one page, and displays the results on a separate page. It would require the ability to include, for instance, links within a dropdown menu. I understand this would be easier accomplished if the content was contained on one page (no iframes or ASP includes, etc.). I can manage that. I have created a Find on Page that works, but highlighting as
Problem submit data for php-Script via jquery-ajax
Hi I have a problem within a Jquery-Script using the get-method to transmit data to a PHP-Script. Here is the code function handleDragStop( event, ui ) { var offsetXPos = parseInt( ui.offset.left ); var offsetYPos = parseInt( ui.offset.top ); alert( "Drag von/nach!\n\nat: ("+ startXPos +"," + startYPos + "/" + offsetXPos + ", " + offsetYPos + ")\n"); $.ajax({ type: 'GET', //url: "ajax_div_wochenelement_drag_drop.php", url: "drag_drop_funktion_per_get_testen.php", data: 'startxpos='
Reorder elements in list nr 1 and have the changes to also be reflected in list nr 2.
I have two lists with the same order from start: List nr 1 1 2 3 List nr 2 1 2 3 Is it possible to reorder elements in list nr 1 and have the changes also reflected in list nr 2. So the purpose is to only touch the elements in list nr 1, and have the changes automatically reflected in list nr 2. Also list nr 2 can be reordered, but the changes would be isolated, and NOT be reflected in list nr 1. https://jsfiddle.net/zsoa1dve/89/
Trying to create a notification popup... The notification overlaps the divs underneath it even after fadeTo()?
I’m trying to create a notification popup (similar to YouTube’s when you add a video to your watch-later or something). This is my attempt: (jsfiddle here) $('#notification-box').hide(); $('body').on("click", "#enableSuspension", function(){ $('#notification-box').append('<p>Client suspension enabled.</p>').fadeTo(1000, 1, function(){ $('#notification-box, #notification-box p').fadeTo(1000, 0); }); }); However, it doesn’t function well at all. I want each individual notification to
Changing height of an element to fit content
I have this script that makes the height of an element with an [data-resize] attribute grow and shrink so that it always fits the content: var maxHt = 100; $.each($('[data-resize]'), function(e) { var offset = this.offsetHeight - this.clientHeight; $(this).on('keyup', function() { if (this.scrollHeight < maxHt) $(this).css('height', 'auto') // not sure why I have to do it like this, but I do... .css('height', this.scrollHeight + offset); else $(this).css({
Submit for and data
Why does this form not submit data $(document).on("submit","#evaluateform",function(e){ e.preventDefault() //$('#evaluateform').serialize(); $.ajax({ method: "POST", url: "functions/getRouteEvaluation.php", data: $("#evaluateform").serialize() }) .done(function( result ) { $("#evaluate-results").html(result); }); }) my form is like this, it's also loaded via another ajax script so loaded dynamically <form id="evaluateform"> <input id="depCode" type="text" placeholder="Departure">
Using jQuery to pass hidden field based on SELECT box selection
Is there a jQuery way to using the "starts with" from the SELECT box to pass a variable to a hidden field? Here's what I have for the script to far, but I need it to only look for the first letter, really. For example, if the user selects "Keyboards - Acoustic Piano", we need "KeyboardMag" to pass through in the hidden field "referralCode". $( document ).ready(function() { var refcode={ Guitars : "GuitarsMag", Keyboards : "KeyboardMag", Drums : "DrumMag",
Submit form data to ldap
I'm trying to post back some form fields back to our ldap connector. I can get both groups and members from within each group, but I'm not getting any response when I try to post back a user. To clarify the steps a bit 1) The user clicks 'Load Groups'. That talks to our LDAP connector. That then populates all of our companies ldap croups. 2) When a user clicks the group, it loads all the users for that group. 3) I have button that when clicked opens the modal where a form lives. 4) I'm sure i'm
Create a function which enables and disables the submit button depending on a checkbox input
Okay, so I am having a hard time trying to understand how a "toggle" effect like this should be written. So I have a form, with a main checkbox-input field, some dynamically added checkbox-input fields, and a submit button. What I am trying to achieve is, when the main checkbox (labelled as "Select All") is checked, to enable the submit button, and when it is unchecked, to disable the submit button. I also want the button to be disabled if NO checkboxes are selected, and I found a nice piece of code
Match A JSON Value to A Key Or Keys
Suppose I have a json object as seen below: { "testTypeA":"A", "testTypeB":"B", "testTypeC":"C", "assortedTest":["X","D","C"] } I have seen many jQuery tutorials on getting json values by using the key but I have not seen any tutorials on getting the key if the value is known. In the above json object, if I would like to get all the keys that have a value of C, what method could I use?
owl carousel does not show images
Hello Jake, I have a product_page.php, that displays an owl-carousel product image gallery on the left and product info section on the right: <div class="row mb-5"> <div class="col-lg-5 mb-5 mb-lg-0"> <div class="owl-carousel owl-theme manual dots-style-2 nav-style-2 nav-color-dark mb-3" id="thumbGalleryDetail"> <div> <img src="img/products/pr-gdesktop-1.jpg" class="img-fluid" alt=""> </div> <div> <img src="img/products/pr-gdesktop-2.jpg" class="img-fluid" alt=""> </div> <div> <img src="img/products/pr-gdesktop-3.jpg"
ajax/getJSON call fails with no error... help!
Hi I am trying to amend some legacy jquery code written by someone else - I'm not a jquery expert... :-( I have a call to getJSON that for some reason started to fail and I couldn't see why. I rewrote it to use $.ajax so I could see what was going on. I have added an error and complete function and also .done, always & .fail to try and see what is happening but neither these nor the original success function are being called. I have spent 3 days now trying to figurre out what is going wrong and
Slider with another slider isnide
Hi there Can anyone help me with this? How can I add slider inside slider. I whant normal big slider and in the bottom of this slider I whant creat brand carousel. Is there any library for it? Or simply I creat two separate sliders and using css I add position to this first one?
Best way to disallow functions on table cells with class="xyz"?
I have a table where I want to allow inline editing for all td elements except those having class="noedit". The following appears to work and only adds the background color to those cells which should be editable. I wonder if there is a better way to do this? I'm pretty new to the :not and :has selectors. <table> <caption>Edit-y Table </caption> <tr> <td class="noedit">Can't edit me<td> <td>But you can edit me</td> </tr> <tr> <td class="noedit">Can't edit me<td> <td>But
Changing on a specific day of the week a custom field
Hey I am trying to use ".show() - .hide()" on a specific field when I selecting a specific day of the week. I have tried a lot of codes lying on the net and without any success. Day 6 is working and disabling but whats inside "IF" is not working jQuery( "#pickup_date" ).datepicker({ beforeShowDay: function(d) { var day = d.getDay(); if( day != 5 ) { jQuery("p#pickup_time_field").hide(); jQuery("p#pickup_time_friday_field").show();
Detect if elements enter viewport from top or bottom
Hey guys, Is there a way to detect (onscroll) wether a div-container enters the viewport from below or from above, and then do something as long as the div remains in the viewport (in relation to scrolling-direction). Thank you very much Tobi
Making an IMG unselectable, IE9 compatible
I've discovered that the non-standard CSS to make something unselectable doesn't work in IE9: .unselectable, [data-em] { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: -moz-none; -ms-user-select: none; user-select: none; -webkit-tap-highlight-color: rgba(0,0,0,0); } When a user inserts an emoji to my contenteditable, I don't want them to be able to click on it and drag to change the size... backspacing
How to call ajax links out of ajax content
The following scripts are encapsulate within "$(document).ready(function()" Script No. 1: $("#incoming_entry").on("click", function(){ $(this).incoming_entry(); }); $.fn.incoming_entry = function() { $.ajax({url: "./query/incoming_incoming.php", success: function(result){ $("#incoming_content").html(result); }}); }; Via click on an a-element with the ID incoming_entry this script
Cant seem to download jquery
I tried to download the jquery latest version. However, instead it gives me this (see below a substract). I'm taking a course and wanted to install the programme on my disk and what I'm getting is not in dowloaded format. Am I doing something wrong? Thanks for help! /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw
How to customize jquery to minimize the size
Hi, I am trying to use jquery in an embedded software project. We are using Micrium RTOS operating system and their HTTP Web Server implementation. As it is embedded software they offer so called static file system (*.html, *.css etc compiled and converted to string literal using #define – see below) and dynamic file system (mounting SD or USB card as a system drive from which files are red). I was told (our local architectural decision) I have to use static files – which basically means that every
Weirdness displaying radio button after form submissions
After submitting a form, we're displaying all the form field data, but for some reason, everything after the radio button will not display on the page. var display = "<h4>Client room</h4>" + $("#firstName").val() + " " + $("#lastName").val() + " " + "<br>" + $("#emailAddress").val() + " " + "<br>" + "Sample 1: " + $("#q1").val() + "<br>" + "Sample 2 " + $("#q2").val() + "<br>" + "Existing: " + document.getElementById("q3").value;
Display form submission data with same-page thank you message
How can we display form submission data in a "thank you" div using only jQuery? There's no URL refresh.
Next Page