Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

jQuery: How to wait for Salesforce to finish rendering?

Asked by Elizabeth Clark Jun 15, 2021 986 views 1 answer
Share

About this question

I have a small script that customises certain list views, hiding buttons.

This is done using jQuery $(document).ready()

Because this js is manipulating standard pages it is stored in the left sidebar.

However, I can see that the call to the function is being made when the document is not really ready. I'm guessing that salesforce is fetching list contents (including buttons) dynamically.

So my attempts to show or hide something are in vain because that thing has not yet been inserted into the page.

How can I make sure that this script gets executed when salesforce is done rendering the list completely?

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.