Location jquery in new tab

Asked

Viewed 25 times

-1

How do I do the Location below open in a new guide?

$(".mySlides").click(function(){

  let url = $(this).data('value');

  $(location).attr('href', url);

});

1 answer

3


No need for JQUERY

$(".mySlides").click(function(){

 let url = $(this).data('value');
    window.open(url, '_blank');
}
  • OK. But, what if I wanted to use jQuery. There is a way around this?

  • I think not, jquery is made to simplify if I am not mistaken, but as you can see this situation is already very simple but not 100% sure that there is something similar in JQUERY

  • 1

    But it’s already great! This solution I already knew. but as you had the good will to help, it was worth the point! Thanks!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.