Trigger function when clicking on slider dots

I’m wanting to create a function that’s triggered when I click on a set of slider nav dots, however it doesn’t seem to work with the code that i have.

Here’s a snippet of the code

$( “.products-slider-nav div.w-slider-dot:nth-child(1)” ).click(function(e) {
console.log(“click 1”);
$( “#tab-1” ).trigger( “click” );
});
$( “.products-slider-nav div.w-slider-dot:nth-child(2)” ).click(function(e) {
e.preventDefault();
$( “#tab-2” ).trigger( “click” );
});
$( “.products-slider-nav div.w-slider-dot:nth-child(3)” ).click(function(e) {
e.preventDefault();
$( “#tab-3” ).trigger( “click” );
});
$( “.products-slider-nav div.w-slider-dot:nth-child(4)” ).click(function(e) {
e.preventDefault();
$( “#tab-4” ).trigger( “click” );
});

Any assistance on this would be much appreciated! <3