How to close smartselect through script and use events?

I am using V2 DOM I want to close smartselect through script. i tried the following but not succeed.

$("mysmartselectid").close();
smartSelect.close();

How i can handle event of smartselect? i tried following but not succeed:

$(".smart_select").on("smartselect:opened", function(){
....
});

$(".smart_select").on("opened", function(){
....
});

$("document").on("opened",".smart_select", function(){
....
});

Your syntax is wrong to what I think, could you give me more details?

This is for events:

$(".smart-select").on('smartselect:opened', function(){
  console.log('opened');
})

To close with script:

<a class="item-link smart-select ..." id="my-ss">...</a>
app.smartSelect.close('#my-ss');
2 Likes