# shared-background

> Share background between multiple children

Latest version **1.0.0** (published 2017-03-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install shared-background
pnpm add shared-background
yarn add shared-background
bun add shared-background
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-03-21 |
| First published | 2017-03-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | MyJob.Company Team |
| Maintainers | myjobcompany |
| Keywords | vanilla, jquery, plugin, background |

## Links

- npm: https://www.npmjs.com/package/shared-background
- Repository: https://github.com/MyJobCompany/shared-background
- Homepage: https://github.com/MyJobCompany/shared-background#readme
- Issues: https://github.com/MyJobCompany/shared-background/issues
- npm.io page: https://npm.io/package/shared-background

## Dependencies (1)

- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.23.0

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-03-21

## README

# Shared Background

![Shared Background](https://i.imgur.com/CxH0YIt.png)

## Introduction

Shared Background is a Javascript script that aims to help developer to use the same background image between multiple elements. We also provide a jQuery integration.

## Usage

### Javascript version
```html
<div id="shared">
  <div class="panel"></div>
  <div class="panel"></div>
  <div class="panel"></div>
</div>
<script src="dist/shared-background.min.js"></script>
<script>
    var container = document.getElementById('shared'); //the DOM element that contain all panels
    var backgroundImageUrl = 'http://lorempixel.com/1024/500/nature'; //the background image to use
    new SharedBackground(container, backgroundImageUrl);
</script>
```


### jQuery version

```html
<div data-shared-background="http://lorempixel.com/1024/500/nature">
  <div class="panel"></div>
  <div class="panel"></div>
  <div class="panel"></div>
</div>
<script src="dist/shared-background.jquery.min.js"></script>
```

or


```html
<div class="shared">
  <div class="panel"></div>
  <div class="panel"></div>
  <div class="panel"></div>
</div>
<script src="dist/shared-background.jquery.min.js"></script>
<script>
  $(function(){
    $('.shared').sharedBackground('http://lorempixel.com/1024/500/nature');
  });
</script>

---
_Source: https://npm.io/package/shared-background · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
