How do I fire an event when a iframe has finished loading in jQuery?

I have a strang requirement when I am working for the Sharepoint OOTB model Popup .
My Client wants to Hide default ribbons for the list.
So I thought about directly applying the css or jquery to hide that ribbon on the model dialog
but I found strange behaviour  from sharepoint , the ribbon is not hiding sometimes and due to that i got in some worse situation.
After some research about the jquery to use for hiding that ribbon using jquery I came across this useful link from stack overflow.
This is the function I have used to hide the Ribbon from the Iframe itself.

$(‘iframe’).load(function () {
// do something once the iframe is loaded
hideContactRibbon();  // My Custom function to hide ribbon
});

Leave a Reply

Your email address will not be published. Required fields are marked *