Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

AJS triggers document.ready before page loaded Edited

AJS.$(document).ready(function() {

displays 0 but it displays 3 when i ran in browser console. Please help me here what it is going wrong?




1 comment

DPK J Community Leader Jan 14, 2020

@Anil KumarFor Jira, don't use AJS.$(document).ready() and use AJS.toInit()

Your function will look this this,

AJS.toInit(function() {

if i use AJS.toInit() also getting same issue.

DPK J Community Leader Jan 15, 2020

Seems like elements are lazy loaded!!

Is there any solution for lazy loaded elements?

DPK J Community Leader Jan 15, 2020

You can give AJS.$.live() a trial if that fits your need. Please refer JQuery documentation for details.


Log in or Sign up to comment

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