Skip to main content

I am trying to get the current loaded model id in my document ready method.

(function(skuid) { var $ = skuid.$; var params = arguments[0]; var activateHandler = function() { skuid.$(“#bodyTable .nx-conditioncontainer-left .nx-conditiontoken.nx-actionselect .nx-actionselect-arrow”).on(“click”, function() { setTimeout(function() { skuid.$(“#bodyTable .nx-conditioncontainer-left .nx-actionselect-dropdown .nx-actionselect-dropdown-item”).on(“click”, function() { if (this.innerHTML === ‘** All Years’) { console.log(‘All Years’); console.log(params.model.id); } }); }) }); }; $(document.body).one(‘pageload’, activateHandler); skuid.events.subscribe(“models.loaded”, activateHandler); })(skuid);