WhatsApp Sharing link using jQuery html

WhatsApp Sharing link using jQuery html

In this post we will show you WhatsApp Sharing link using jQuery html, hear for WhatsApp Sharing link using jQuery html we will give you demo and example for implement.

In this short post, find jQuery code to share any content on whatsapp. The code first checks for mobile device and if it’s a mobile device then it just creates whatsapp URL with user defined text and link to share and then just redirects it. That’s it.

For Simple HTML

<a href="whatsapp://send?text= Share via WhatsApp , See More: ; data-action="share/whatsapp/share"  class="link-whatsapp">Share via WhatsApp</a>

For PHP CODE


$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$actual_link = "http://www.onlinecode.org/";

<a href="whatsapp://send?text= Share via WhatsApp , See More: <?php echo $actual_link; ?>" data-action="share/whatsapp/share"  class="link-whatsapp">Share via WhatsApp</a>

Html of WhatsApp Sharing link using jQuery html

<!DOCTYPE html>
<html>
	<head>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
	</head>
	<body>

		<h2>WhatsApp Sharing using jQuery html</h2>
		<p>Share via WhatsApp</p>
		<p>This is HTML CODE Share via WhatsApp.</p>

		<p>
		<!-- CODE OF SHARE VIA WHATSAPP -->
			<a href="whatsapp://send?text= Share via WhatsApp , See More: ; data-action="share/whatsapp/share"  class="link-whatsapp">Share via WhatsApp</a>
		<!-- END CODE OF SHARE VIA WHATSAPP -->	
		</p>

	</body>
</html>

Hope this code and post will helped you for implement WhatsApp Sharing link using jQuery html. 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 onlincode. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs onlincode.org

Leave a Comment

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

  +  36  =  39

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US