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.

The third major release of the jQuery library ([jQuery]) has been worked on for a long time and contains some major changes. There is no official release yet, only an Alpha and a Beta version.

See

90 questions
3
votes
5 answers

Event on First click, Second click, and Third click

$('#element').toggle(function(){ $(this).addClass('one'); }, function(){ $(this).removeClass('one').addClass('two'); }, function(){ $(this).removeClass('two').addClass('three'); }); #element{ …
Riot Zeast Captain
  • 958
  • 5
  • 13
  • 35
3
votes
1 answer

JQuery3.0 throws error setting a property that has only a getter firefox

I have created SVG circle dynamically and animated it small circle to large using JQuery. Animation was working fine in other JQuery version and throws exception "setting a property that has only a getter" in JQuery version 3.0 only. I have searched…
Bharathi
  • 1,288
  • 2
  • 14
  • 40
3
votes
2 answers

$.event.mouseHooks is broken in jquery 3, worked in the beta

I use a open source project that is no longer maintained: https://github.com/timmywil/jquery.panzoom I has worked well with the jquery 3 beta, but is broken since the official release. The problem seems to be $.event.mouseHooks, it has been…
Krillko
  • 626
  • 1
  • 8
  • 19
2
votes
1 answer

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.log(e.target); //here's where I would filter by…
Alvaro
  • 40,778
  • 30
  • 164
  • 336
2
votes
1 answer

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'm sure the html in data is perfectly fine and…
Alexandre Parent
  • 127
  • 1
  • 10
2
votes
0 answers

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 course, it doesn't always happen. Load before ready…
max
  • 8,632
  • 3
  • 21
  • 55
2
votes
2 answers

jQuery's show/hide won't work with elements not attached to DOM (breaking change found in 3.0)

I am working on upgrading big application to latest jQuery 3.0 from pretty ancient 1.11.2. I found pretty subtle change that broke some of our functionality: when we instantiate some complex widgets, we initially hide some of the elements using css…
vmg
  • 9,920
  • 13
  • 61
  • 90
1
vote
2 answers

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 usual problems people encountered where due to wrong…
djevulen
  • 112
  • 1
  • 8
1
vote
1 answer

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 not a function". What the heck does that even…
1
vote
1 answer

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 $("#top_data_label").css("visibility",…
deltaforce
  • 85
  • 1
  • 1
  • 11
1
vote
0 answers

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 text for the selected…
Y.S
  • 11
  • 2
1
vote
1 answer

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 not understand why the values are not serialized,…
user605505
  • 59
  • 1
  • 3
  • 18
1
vote
1 answer

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(); return $.ajax({ url: 'http://' +…
rancor1223
  • 356
  • 2
  • 16
1
vote
3 answers

JQMIGRATE: easing function "jQuery.easing.swing" should use only first argument

I am upgrading my JQuery V1.9.1 to V3.0 and I am using the "jquery migrate 3.0". I have this warning in my Console : JQMIGRATE: easing function "jQuery.easing.swing" should use only first argument When I searched the source of the warning's…
Ardalan Shahgholi
  • 11,967
  • 21
  • 108
  • 144