Jquery Open Link in New Tab on Click Example

Jquery Open Link in New Tab on Click Example

In this post we will give you information about Jquery Open Link in New Tab on Click Example. Hear we will give you detail about Jquery Open Link in New Tab on Click ExampleAnd how to use it also give you demo for it if it is necessary.

In this example, we will lean how to open link in new tab on button click event in jquery. we will see example of onclick open link in new tab jquery. we have two example of open url in new tab on button click jquery.

I created two way to open link in new tab in jquery. first one is a using window.open() and another is ‘target=”_blank”‘ on anchor tag. so i added both example bellow you have to just check that you can see how it will helps us.

Let’s see both example and you can use anyone as you need.

Example 1:

<!DOCTYPE html>

<html>

<head>

<title>Jquery Open Link in New Tab on Click Example - ItSolutionStuff.com</title>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

</head>

<body>

<button >Click Me</button>

<script type="text/javascript">

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

window.open("https://www.onlinecode");

})

</script>

</body>

</html>

Example 1:

<!DOCTYPE html>

<html>

<head>

<title>Jquery Open Link in New Tab on Click Example - ItSolutionStuff.com</title>

</head>

<body>

<a href="https://www.onlinecode" rel="noopener noreferrer" target="_blank">Click Me</a>

</body>

</html>

I hope it can help you…

Hope this code and post will helped you for implement Jquery Open Link in New Tab on Click Example. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

5  +    =  14

We accept paid advance and paid guest Posting on our Site : Contact US