Skip to main content

I see from skuid documentation that you can subscribe to standard events. Got it. 
It also says that you can subscribe to ‘custom events’ and then shows an example by registering a component. 

I don’t quite understand this. If I want to listen for a click on a certain element, can I do it with this function, or should I use javascripts native eventListener method?

The source for my event is a jQuery. My code is below. I’ve tested the jQuery selector in the console and it’s working but when I click on the “Last Month” action item, nothing gets logged (although other action framework events associated with the action item do work). I’m using an the snippet type is ‘In-line.’


$ = skuid.$;skuid.events.subscribe(

$(“.nx-actionselect-dropdown-item:contains(‘Last Month’)”).click(),

function(){

console.log(‘Last Month Has Been Clicked!’);

}
);


I also tried putting the event into a string “$(”“.nx-actionselect-dropdown-item:contains(‘Last Month’)”“).click()”,

Be the first to reply!

Reply