It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Updating Statuspage to jQuery 3.5

On June 15, 2020, the jQuery library that loads on all status pages will be updated to jQuery 3.5. We’re making this update to protect status pages against known security vulnerabilities in the version currently used, jQuery 1.8.2.

Before we make this update, we want users of status pages with custom JavaScript to confirm their page customizations work correctly with both versions. It's unlikely that any pages will require edits to the existing JavaScript, but your page may have jQuery functions that aren’t supported or have changed with the update to jQuery 3.5.

To help you verify if there is any impact to your page, we’ve added the ability for you to preview your page with jQuery 3.5 before we make the update:

  1. Click Your page in the left sidebar menu.

  2. Click Customize page and emails in the secondary menu.

  3. Click the Customize HTML & CSS button in the top right of the Customizations page.

  4. Locate the toggle at the top of the page for Preview jQuery version, as shown below.

  5. Select v3.5. Your page will update to show what it will look like under the new version.

  6. Take note of your customizations affected by the new version.

  7. Make the necessary customization changes or contact our support team for help.


    image-20200507-021624.png

2 comments

Thanks @Chase Wilson! I can add a little bit more commentary about this update, as well as give some guidance about what you might need to change, if anything.

The jump from jQuery 1.8.x to 3.5.x is a big one, and there have been a number of breaking changes along the way. However, there's a good chance that your page will continue to work just fine, with no changes to your custom code. The best approach is to test your page using the jQuery preview we've provided, and check the js console for any errors that appear when you to toggle to jQuery 3.5.

If you do encounter errors, the jQuery API docs have ample information about what's been deprecated.

If your custom code includes any of the snippets from our sample customizations library, the good news is that 100% of those work in jQuery 3.5.x without any change required.

So, how about some examples of code that work in jQuery 1.8.x but not in jQuery 3.5.x? Here are a couple no-longer-supported methods you may be using in your custom code:

.load()

The .load() method has been removed. So if your custom code is binding an event handler to the "load" JavaScript event, and you're doing it like this:

$(window).load(function() {
// do amazing stuff
});

Then you should update your code to use the .on() method instead, like this:

$(window).on("load", function() {
// do amazing stuff
});

.unload()

Similarly, the .unload() method has been removed and should be updated with the .on() method, thusly:

$(window).on("unload", function() {
// do more amazing stuff
});

.size()

The .size() method has been removed, and you should instead use the .length property, which is functionally equivalent. So this:

var n = $("div").size();

Should be replaced with this:

var n = $("div").length;

Of course this is not an exhaustive list of all the breaking changes. If you end up having to update your code, please feel free to share your examples here in the comments!

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Statuspage

Introducing Statuspage Free

Atlassian community, Today is a major day not only for Statuspage, but also for the Atlassian community. Statuspage continues to be the industry leader for incident communication by constantly look...

558 views 2 30
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you