![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
jquery-floating-social-share
Advanced tools
Simple jQuery floating social media sharer plugin. Currently supported platforms are Facebook, Twitter, Linkedin, Pinterest, Reddit, Tumblr, VK and Odnoklassniki with counter feature, Mail, Telegram, Viber, and Whatsapp without counter feature.
You can check the plugin live in here: https://onlinealarmkur.com/en/
Install via bower and include from your bower_components
folder.
bower install --save jquery-floating-social-share
Or install via npm and include from your node_modules
folder
npm install --save jquery-floating-social-share
Or install via zip, then include jQuery and the plugin on a page.
<link rel="stylesheet" type="text/css" href="dist/jquery.floating-social-share.min.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="dist/jquery.floating-social-share.min.js"></script>
Finally, call the floatingSocialShare
method on body with your custom options.
$("body").floatingSocialShare({
buttons: ["facebook", "twitter"],
text: "share with:"
});
To make the social share buttons appear next to the specific content, instead of the body, reference with selector.
$(".content").floatingSocialShare({
buttons: ["facebook", "twitter"],
text: {
'facebook': 'Share on Facebook',
'twitter': 'Share on Twitter'
},
place: "content-left"
});
String
(top-left
by default) Set the position of the box. Currently: content-left
, content-right
, top-left
and top-right
are available.Boolean
(true
by default) Set to false
to hide counters that appear below the buttons.Boolean
(false
by default) Set to true
to show twitter counter, but you also need to register to Open Share Count since Twitter API does not provide counters without an API key.Array
(["facebook", "twitter", "google-plus"]
by default) Sets the social buttons for sharing. Available ones are mail
, facebook
, linkedin
, odnoklassniki
, pinterest
, reddit
, telegram
, tumblr
, twitter
, viber
, vk
, and whatsapp
.String
(document.title
by default) Sets the title for the share message.String
(window.location.href
by default) Sets the url for the share message.Object | String
({'default': 'share with:'} by default) Sets the share title for the social buttons. If properties are not assigned specifically, will use the default one appended with the button tag, for instance share with facebook.Boolean
(false
by default) Converts share text to title case, for instance, share with facebook will become Share With Facebook when set to true.String
($('meta[name="description"]').attr("content")
by default) Sets the description for the share.String
($('meta[property="og:image"]').attr("content")
by default) Sets the media for the Pinterest share.Boolean
(true
by default) Opens page sharer links, for instance Twitter intent page, in a new tab.Boolean
(true
by default) Opens links in a popup when set true. When it is false, links are opened in a new tab.Number
(400
by default) Sets the sharer popup's width.Number
(300
by default) Sets the sharer popup's height.Number
(15
by default) Adds an extra offset for margin-left
if the selected place is content-right
or content-left
.$("body").floatingSocialShare({
place: "top-left", // alternatively content-left, content-right, top-right
counter: true, // set to false for hiding the counters of buttons
facebook_token: null, // To show Facebook share count, obtain a token, see: https://stackoverflow.com/questions/17197970/facebook-permanent-page-access-token/43570120#43570120
buttons: [ // all of the currently available social buttons
"mail", "facebook", "linkedin", "odnoklassniki",
"pinterest", "reddit", "telegram", "tumblr", "twitter",
"viber", "vk", "whatsapp"
],
title: document.title, // your title, default is current page's title
url: window.location.href, // your url, default is current page's url
text: { // the title of tags
'default': 'share with ',
'facebook': 'share with facebook',
'twitter': 'tweet'
},
text_title_case: false, // if set true, then will convert share texts to title case like Share With G+
description: $('meta[name="description"]').attr("content"), // your description, default is current page's description
media: $('meta[property="og:image"]').attr("content"), // pinterest media
target: true, // open share pages, such as Twitter and Facebook share pages, in a new tab
popup: true, // open links in popup
popup_width: 400, // the sharer popup width, default is 400px
popup_height: 300 // the sharer popup height, default is 300px
});
Install node and npm following one of the techniques explained within this link and run the commands below.
$ npm install --global gulp-cli
$ npm install
$ gulp
2.4.0
FAQs
Social media share buttons with counters.
The npm package jquery-floating-social-share receives a total of 0 weekly downloads. As such, jquery-floating-social-share popularity was classified as not popular.
We found that jquery-floating-social-share demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.