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
0
votes
0 answers

jQuery.offset not working correctly in chrome anymore in version 3.1.0

jquery.offset always returns 0/0 when applied to an SVG element in chrome.
suamikim
  • 5,350
  • 9
  • 40
  • 75
0
votes
1 answer

How to get viewport size in jquery-3?

$(window).height() used to return the height of the browser viewport window, and $(window).width() was used for browser window width. $(window).height() now just returns the same value as $(document).height(), i.e. the height of the whole page.…
Ilia Sidorenko
  • 2,157
  • 3
  • 26
  • 30
0
votes
0 answers

How to correctly run code after a function has been completely executed in jQuery?

I am using a fullscreen CSS-preloader that should be removed completely from the site once the window has been completely loaded AND the function checkRetinaHeader() has been fully executed. The site is running on jQuery v3.1.0. The code works on…
user6655274
0
votes
0 answers

Window on load not triggering reliably inside document ready function - jQuery v3.1.0

I built a simple css preloader that should fade out with jQuery once the page has been completely loaded with all images etc.: $(document).ready(function() { // Preloader $(window).on('load', function() { …
user6655274
0
votes
0 answers

get the old width() with jQuery v3

I have a div which is scaled constantly via CSS3, and I want to get the "original" width, not the "scaled/real" width in jQuery 1.x, 2.x I was able to get it using the width() method, but now in the new version of jQuery (which is v3) I'm getting…
0
votes
1 answer

Make SignalR's JavaScript library work with JQuery 3

JQuery is up to version 3.1. In version 3 it seems they removed the methods .load, .unload and .error. But SignalR's JavaScript library still seems to use those. Is there a way to work around this so I don't have to use an older version of JQuery?…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
0
votes
3 answers

Unexpected behavior of code in window onload within document ready block

With JQuery <= 2.x, this code worked, displaying the text in the div after everything had loaded: JQuery 3 Window onload test
Tom
  • 1,836
  • 4
  • 16
  • 30
0
votes
2 answers

How would I use an only for IE8 and not for any other browser

I'm currently using jquery 3.0 on a site. I understand that support for IE8 was dropped in Jquery 2, but is there a way to use jquery 1.9 for IE8 and use Jquery 3.0 on any other browser?
Matt
  • 896
  • 5
  • 18
  • 47
-1
votes
1 answer

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
  • 1,158
  • 12
  • 28
-1
votes
4 answers

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:
JAVASCRIPT: var row = '' + '
alextc
  • 3,206
  • 10
  • 63
  • 107
-1
votes
1 answer

Drupal 8 jQuery 3.3.1 Error: Syntax error, unrecognized expression: ul.nav > li > 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 active tab of bootstrap nav pills. While the custom…
Vivek22
  • 836
  • 1
  • 12
  • 19
-1
votes
2 answers

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').off('click', function () { $('p').text("Ha Ha…
SalmanShariati
  • 3,873
  • 4
  • 27
  • 46
-2
votes
2 answers

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": "bmw123"},{"CarType": "mercedes","carID":…
user3067524
  • 506
  • 4
  • 10
  • 26
-2
votes
3 answers

Add click event on dynamically created select

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 () { var cs = $(this).val().length+1; …
occiso
  • 7
  • 1
-2
votes
1 answer

jQuery's data() function does not seem to be working right.

Previously I had been doing: My HTML: The Answer My "jquery": const fooElement = $('#foo'); const fooBar = fooElement.data('foo-bar'); // 42 // or const fBar = fooElement.data()['foo-bar']; // 42 But after I…
Naftali
  • 144,921
  • 39
  • 244
  • 303
1 2 3 4 5
6