Skip to main content

Questions tagged [jquery-3]

New features of jQuery 3.0 or changes in behaviour from jQuery 2.x to jQuery 3.x. Always use together with the [jquery] tag.

jquery-3
1 vote
4 answers
62 views

Check if textbox exist in table cell or not

Here is my code: var result = ''; var rows = $("#table_wf tbody tr input[type='checkbox']:checked").closest('tr'); for (var i = 0; i < rows.length; i++) { var row = rows[i] result += ...
Saurabh's user avatar
  • 1,579
0 votes
1 answer
66 views

Set attribute with an empty string

I'm trying to toggle the required attribute on fields using jQuery. On page load I add the required attribute to the relevant elements: $("[data-required]").attr("required", "&...
kait's user avatar
  • 335
9 votes
1 answer
11k views

Async/Await with JQuery document READY

It works with document.addEventListener("DOMContentLoaded", async () => {}) but I am curious of making it work with JQuery. And also, I want with Async/Await, not promises because later I ...
Venda 97's user avatar
  • 265
0 votes
1 answer
295 views

jquery 3.0.0 upgrade broke html table functonality

We are upgrading jquery from 1.8.2 to 3.0.0 in a legacy project which have many plugin. We are using migrate plugin for ease of up-gradation ,it not showing any error in console except couple of ...
jasim's user avatar
  • 288
0 votes
2 answers
1k views

$.trim().val is not a function

I am working on updating jQuery version of our applications from jquery version 1.7 to 3.6 so, I am facing issue with 'trim' method. we have used trim method like in old jQuery version but it has ...
Prasad Patel's user avatar
0 votes
1 answer
111 views

Hi, I am using Drupal 9 and on a request in network tab jQuery 3.5.1 sends another contextual render call. Any reason of this call?

I am using Drupal 9 and on a request in network tab jQuery 3.5.1 sends another contextual render call. Any reason of this call?
M Arif's user avatar
  • 421
0 votes
1 answer
561 views

Run inline jQuery after jQuery-library is fully loaded at the bottom of the document?

I have a big inline jQuery function that I want to trigger after the jQuery library is loaded at the bottom. Otherwise I'd get the "Uncaught ReferenceError". Therefore I wrapped the function ...
арно нюм's user avatar
0 votes
3 answers
1k views

Retrieve Json Data as a IEnumerable

Goal: Send a json data with many data from frontend to backend. Problem: When I send the data to the backend i do not retrieve it as a IEnumerable What part of the code am I missing? Info: *Using ...
HelloWorld1's user avatar
  • 13.9k
0 votes
0 answers
56 views

Javascript, Jquery 3 - Run get request before anything else

At the beginning of the file I have the following code: $.get( "/users/getInfo", "json" ).done(function(data){ window.User = data }) import './components/map' import './components/search'...
Sasha's user avatar
  • 8,627
-1 votes
1 answer
84 views

Laravel nav bar toggle not working on the bootstrap 4.4.1 and jquery 3.3

Using bootstrap 4.0.0 and jquery 3.3. Navbar toggle not working and saying Uncaught TypeError: Cannot convert object to primitive value
Vikas Rinvi's user avatar
  • 1,268
1 vote
2 answers
791 views

jQuery ajax call can't read json encoded data from CakePHP 3.8 (gets an empty array)

I have a weird problem with reading json encoded data returned by my CakePHP3 API in response to an ajax call from jQuery. I have already read over 20 posts on stackoverflow and elsewhere and the ...
djevulen's user avatar
  • 112
1 vote
1 answer
466 views

Is there an alternative to ImageMapster that works with jQuery 3.x?

I've been trying all afternoon to get ImageMapster to work... I kept getting the weirdest errors, and all the Google searching in the world didn't help... (Stuff like "Uncaught TypeError: i.size is ...
Laurence MacNeill's user avatar
0 votes
2 answers
1k views

jQuery change event being fired twice

I have a form with input fields including a date. Below is my code; <form action="/test/" method="get" class="form-horizontal"> <!-- truncated codes --> <label class="col-sm-1 ...
suganthan sivananthan's user avatar
0 votes
1 answer
100 views

Carousel control not working in bootstrap version 4

I am using bootstrap version 4. But My Carousel control is not working. Am I missing any thing? Same below code is working perfectly fine If i change version to 3.4 Please help me here. PFB are JS ...
Avinash's user avatar
  • 2,163
0 votes
1 answer
326 views

AJAX function inside $.extend not working in jQuery 3

I need to extends jQuery (as a plugin). Problem is, $.ajax is not working inside the $.extend scope but outside the scope it is working fine. I am using jQuery 3.4.1 in my project. My code: (...
M B Parvez's user avatar
-1 votes
4 answers
1k views

jQuery 3.3.1 - row is not added to tbody of a table using append()

I am trying to dynamically add a row to a table on the html upon a click event with JQuery 3.3.1 and Bootstrap 4. HTML: <table id='tblAddedCallsign' class='table table-striped'> </table> ...
alextc's user avatar
  • 3,416
1 vote
1 answer
316 views

How to set visibility and attr in jquery 3

After upgrading JQuery 1 to JQuery 3 in our application, some JQuery code stopped working. I tried looking at https://api.jquery.com/visible-selector/ but could not get help Previous Code $("#...
deltaforce's user avatar
1 vote
0 answers
47 views

text() returning entire object, instead of selected text

I upgraded the jquery library from 1.4.2 to 3.4.0 Have a drop down. .val() is returning the selected value as expected, but .text() is returning is entire object. Need to know how to get the displayed ...
Y.S's user avatar
  • 11
0 votes
0 answers
1k views

Cannot read property 'ownerDocument' of undefined - while upgrading jquery

We are using jquery 1.11.1 four application and upgrading to jquery 3.3.1. For all the hyperlinks, on click facing "Cannot read property 'ownerDocument' of undefined". This is when I upgrade jquery UI ...
user7's user avatar
  • 515
0 votes
0 answers
81 views

Problem with variable 0 and jQuery $.getJSON as param

I think I found bug In latest jQuery 3.3.1. My problem looks like this - when I try to send index as number 0 or string 0 using getJSON function I doesn't get any response. Trying other numbers or ...
Grzegorz Miśkiewicz's user avatar
0 votes
1 answer
876 views

jQuery .on('load') works for one function, but not a different one

I'm starting from the ground up, developing a single page web app. I'm using some jQuery to create a loading screen, which is replaced with the web app after all the code is loaded. I'm trying to do ...
Julian Lachniet's user avatar
0 votes
1 answer
1k views

jQuery ajaxPrefilter fires after request is sent

According to the description of jQuery.ajaxPrefilter(), it's supposed to get fired before the request is sent to $.ajax(), but from what I'm seeing in my project, the server API endpoint gets called ...
Shahin Dohan's user avatar
  • 6,669
2 votes
2 answers
18k views

jquery 3.3.1 Uncaught TypeError: e.indexOf is not a function at w.fn.init.w.fn.load

<img class="my-foto" src="fashion-033-thumb.jpg" data-large="fashion-033.jpg"> <!-- Optional JavaScript --> <!-- <script src="jquery-1.8.2.min.js"></script> --> <...
Ammar's user avatar
  • 79
0 votes
1 answer
31 views

Syntax issue when trying to rewrite a Jquery plugin from version 1.5 to version 3.3

I found this JQuery plugin that looks pretty good for my project. But sadly, it was written way back in 2010, and it can't work with JQuery 1.6+. As the source code isn't very long, I've then ...
kabrice's user avatar
  • 1,625
0 votes
0 answers
158 views

How to empty date range when radio button is selected

I've problem to empty date range when radio button is selected on modal bootstrap 4 This is the code HTML: <div class="form-group row"> <label class="col-md-3 col-form-label">Island ...
maitimo's user avatar
  • 57
-1 votes
1 answer
248 views

Drupal 8 jQuery 3.3.1 Error: Syntax error, unrecognized expression: ul.nav &gt; li &gt; a error while applying the javascript

Newbee here. (plz refer this link: Change Bootstrap Active nav-pills tab border bottom shape to solid underline - i was trying to achieve this one) I tried to apply the js file for underlining the ...
Vivek22's user avatar
  • 862
0 votes
1 answer
654 views

BootstrapDailog is not working in Bootstrap4 with Jquery 3.3.1

I am using BootstrapDialog with Bootstrap4 and Jquery3.3.1 when i call BootstrapDialog.confirm then it will throw an error "Uncaught TypeError: Object.keys called on non-object" in older version of ...
Ravi Raggu's user avatar
2 votes
1 answer
98 views

jQuery click event on link won't get catched in vaniila JS

I am using the following Vanilla binding in order to simulate the jQuery delegation event: document.addEventListener('click', function(e) { console.log("some element was clicked"); console....
Alvaro's user avatar
  • 41.4k
0 votes
1 answer
1k views

jQuery 3 + Ajax + PHP send mail form not sending mail

I've been trying to re-write a jQuery + PHP send mail form but despite trying 3 methods it's still throwing a 500 Internal Server Error. I'm rewriting because I'm migrating the site to jQuery 3 and ...
Erland's user avatar
  • 123
0 votes
1 answer
73 views

Trouble with CSS in ASP.NET 4.6

I have a project I've been working on for the past couple of months. Everything has been working fine up till today. When I came I noticed that all my button sizes were the same. I like to use the ...
NMeneses's user avatar
  • 152
0 votes
3 answers
296 views

set entity attribute (selecting a radio button) with ajax in Symfony 2.5

I want to integrate Ajax in my Symfony project (Symfony 2.5 and jQuery 3). I want to update an attribute of an Entity when I select a radio button. For now, I can get the id of the row that I select. ...
Francisca GV's user avatar
-2 votes
2 answers
110 views

Jquery 3.3.1 populate Dropdown from JSON object

Trying to run a smaple example to parse a JSON object to the dropdown. Using latest jquery-3.3.1.js and IE 11. Coud some one correct the below sample ? var test = { Cars: [{"CarType": "BMW","carID": "...
user3067524's user avatar
1 vote
1 answer
891 views

jquery serialize yields an empty array

i am trying to use jquery serialize to pass some values from a form in an ajax post request to my server but the serialize function returns an array full of nulls, the values aren't serialized. i do ...
user605505's user avatar
0 votes
1 answer
55 views

bootstrap DropDown dont work

I created a navbar by DropDown but now copy it to my new project. but it doesn't work. Version of jquery and bootstrap is same. head is <script src="~/Scripts/bootstrap.min.js"></script>...
mahdi's user avatar
  • 258
2 votes
1 answer
75 views

Multi id selector

$('body').append($('#add-done-modal, #add-failed-modal', data)); This code should append the div with id add-done-modal and add-failed-modal to body. Those div are served in data among other stuff. I'...
Alexandre Parent's user avatar
0 votes
1 answer
965 views

Alternative to load() in jQuery 3 For Loading Bootstrap 4 Modal Remote Content

Loading another page/content (aka "remote" content) into a Bootstrap Modal has been the bane of many developer, and great solutions like this one work: $('body').on('click.modal.data-api', '[data-...
Joyrex's user avatar
  • 1,103
0 votes
1 answer
229 views

Bootstrap4, JQuery3 and FOS Comment Bundle => $.get(...).error is not a function

This is more a fix I found rather than a question. On a Symfony 3 project, I decided to upgrade to bootstrap 3 to 4. It implied using JQuery3 which is not fully compatible with the asynchronous ...
Fazhom Arnaud's user avatar
0 votes
1 answer
1k views

Twitter Bootstrap v4 and jQuery 3.2.1

I'm trying to migrate to the new version of bootstrap and jQuery. Dropdown in example not working and console outputs error: > Syntax error, unrecognized expression: # This is my code: <...
Daria's user avatar
  • 357
0 votes
1 answer
54 views

No Validation errors showing up using jquery 3x with formvalidator.net

I am using the latest version 2.2x of Jquery Plugin from formvalidator.net along with bootstrap 4. jsfiddle : https://jsfiddle.net/adarshmadrecha/ckpLsqod <body> <script> $.validate(); &...
Adarsh Madrecha's user avatar
0 votes
0 answers
36 views

How to delete a parent element [duplicate]

When a link is clicked it should delete its own parent. Here is the code I am using. Its not working. (function () { $(".delete-field").on("click", function () { var elementId = $(this)....
Luke101's user avatar
  • 64.6k
3 votes
1 answer
255 views

unlike jquery 1 and 2, jquery 3 ajax handler is executing newly added html+js only after completing handler code

I've made a jsbin to show the problem: http://jsbin.com/dexeqiz/edit?html,js,output having this html: <div id='log'></div> <div id='scripts'></div> and js: $.get('...', ...
Omu's user avatar
  • 70.8k
-1 votes
2 answers
286 views

jQuery 3.x .off() after .on()

I simply used .off() method after .on() method for .click() method. I'm really confused why click() event fires! $('span').on('click', function () { $('p').text("You Clicked!") }); $('span')....
SalmanShariati's user avatar
4 votes
0 answers
135 views

Debugging exceptions with jQuery 3.0

I recently upgraded from jQuery 2.4.1 to 3.2.1, and now I'm noticing that any exception that occurs during document ready handling (inside $(function() { ... })) instead of giving proper traceback and ...
riv's user avatar
  • 7,234
0 votes
1 answer
978 views

How to stop propagation in all controls in a modal

Since I found annoying the caching of a modal in angularjs and bootstrap, I found this article "$modal caching" to add a kind of version into the url of the modal and in that way avoid the caching of ...
Maximus Decimus's user avatar
0 votes
1 answer
33 views

Check existing selections in dropdownlist during record edit

I have some rows in a grid that are editable by a user. When the user clicks the edit button in a grid row, i'm displaying a multi-select dropdownlist ("ddlEditRegionList") with options to choose ...
StackTrace's user avatar
  • 9,360
1 vote
1 answer
110 views

Order of thrown errors?

I have a function that upon error (for example "timeout") is supposed to throw an error, which I catch at the end of the promise chain. var createOrder = function (id) { Utility.toggleProgressBar(...
rancor1223's user avatar
2 votes
0 answers
716 views

Why load event sometimes fires before ready event in jQuery 3.x?

I've tried to understand that reading other topics about it here on SO, but I couldn't find clear answer. I've also checked https://api.jquery.com/ready/ and https://api.jquery.com/load-event/ Of ...
max's user avatar
  • 8,647
-2 votes
3 answers
2k views

Add click event on dynamically created select [duplicate]

I made this example code: https://jsfiddle.net/gwpcfp89/ The question is about this click event: var wrapper = $(".select-editable"); // Fields wrapper $(wrapper).on('keypress', '#input1', function ...
occiso's user avatar
  • 7
0 votes
1 answer
128 views

JQuery .on not working when content is being called from Ajax

I've got an issue that I see was solved for many people, but it seems that none of the solutions are working for me. Maybe it is my approach. I've got an Edit page (for an Album), within, it has a ...
Derek's user avatar
  • 663
0 votes
2 answers
242 views

image array loop JS CSS

im trying to get the images to be placed in side the div so h/w can be controlled and i can seem to get it to work with jquery 3.2.1 it only works with jquery 2.1.1, is there an better way of write ...
evanrochon's user avatar

15 30 50 per page