I am trying to format existing href attribute based on click event. Below is mys code.
var clicked = false;
$('a').click(function(e) {
if(clicked === true){
//link already formatted
// link should open here
}
else{
e.preventDefault();
//code to format link
clicked = true;
$(this).trigger('click');
}
});
Now the issue is, I am able to format the link and then trigger click event; but link is not opening.
Kindly help/guide.
Note : question/query is more towards triggering the click event with modified link.. this part is not explained/answered in any existing threads.