Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ To get started with Selection.js, download the [Script](https://github.com/prate
speak:true,
backgroundColor: 'crimson',
iconColor: '#fff',
opacity: 0.8,
}).init();
</script>
```
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,17 @@ <h2 class="header text-center">Basic Usage</h2>
</div>
<div class="col-md-6">
<h2 class="header text-center">Advanced Usage</h2>
<script src="https://gist.github.com/prateekkalra/a858930c0955576892a8aa400a18b472.js"></script>
<script src="https://gist.github.com/s1r-J/295e56b7614259335a5807c8ef7221b2.js"></script>
</div>
</div>

</div>


</body>
<script type="text/javascript" src="index.js"></script>
<script type="text/javascript" src="selection.js"></script>
<script type="text/javascript">
var selection = new Selection();
var selection = new Selection();
selection.config({
facebook: true,
twitter: true,
Expand All @@ -74,6 +73,7 @@ <h2 class="header text-center">Advanced Usage</h2>
translate:true,
backgroundColor: 'crimson',
iconColor: '#fff',
opacity: 0.8,
}).init();
</script>
</html>
3 changes: 3 additions & 0 deletions selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const Selection = (function() {
let iconsize = 24 + buttonmargin;
let top = 0;
let left = 0;
let opacity = 1;

function facebookButton() {
const fbbtn = new Button(facebookConfig.icon, function() {
Expand Down Expand Up @@ -229,6 +230,7 @@ const Selection = (function() {
'px;' +
'transition:all .2s ease-in-out;' +
'box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);' +
'opacity:' + opacity + ';' +
'z-index:99999;';

div.appendChild(_icons.icons);
Expand Down Expand Up @@ -308,6 +310,7 @@ const Selection = (function() {

bgcolor = options.backgroundColor || '#333';
iconcolor = options.iconColor || '#fff';
opacity = options.opacity || 1;
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion selection.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.