Hi,
I want to trigger loaded event in SharePoint Document Location Subgrid. I tried so many ways but didn't work.
Below code is working for other subgrid except SharePoint Document Location Subgrid.
//var entityGridDocument = $(".subgrid.sharepoint-grid").eq(0);
var entityGridDocument = $(".entity-grid.subgrid").eq(0);
entityGridDocument.on("loaded", function () {
entityGridDocument.find("table tbody > tr").each(function(index, tr) {
if(myStatus == "1")
{
$(tr).find('.btn.btn-default.btn-xs').hide();
}
});
});
Please suggest your thoughts!
Solved! Go to Solution.
Hi @hardikv
I found a way of triggering "loaded" event in SharePoint Document Location Subgrid, it's a workaround but is works great.
Found the answer here: https://stackoverflow.com/questions/15657686/jquery-event-detect-changes-to-the-html-text-of-a-div
$(document).ready(function () {
// Select the target node.
var target = document.querySelector('.sharepoint-loading')
// Create an observer instance.
var observer = new MutationObserver(function(mutations) {
//do stuff
});
// Pass in the target node, as well as the observer options.
observer.observe(target, {
attributes: true,
childList: true,
characterData: true
});
});
Hope it helps!
/ErikLm
Hi @hardikv
I found a way of triggering "loaded" event in SharePoint Document Location Subgrid, it's a workaround but is works great.
Found the answer here: https://stackoverflow.com/questions/15657686/jquery-event-detect-changes-to-the-html-text-of-a-div
$(document).ready(function () {
// Select the target node.
var target = document.querySelector('.sharepoint-loading')
// Create an observer instance.
var observer = new MutationObserver(function(mutations) {
//do stuff
});
// Pass in the target node, as well as the observer options.
observer.observe(target, {
attributes: true,
childList: true,
characterData: true
});
});
Hope it helps!
/ErikLm
ErikLm
This codes work. Thank you .
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 |